diff --git a/direct/src/plugin/p3dInstance.cxx b/direct/src/plugin/p3dInstance.cxx index 2e85127091..4434d88d03 100644 --- a/direct/src/plugin/p3dInstance.cxx +++ b/direct/src/plugin/p3dInstance.cxx @@ -2974,6 +2974,7 @@ set_install_label(const string &install_label) { //////////////////////////////////////////////////////////////////// void P3DInstance:: paint_window() { +#ifdef __APPLE__ const P3D_window_handle &handle = _wparams.get_parent_window(); if (handle._window_handle_type == P3D_WHT_osx_port) { paint_window_osx_port(); @@ -2985,6 +2986,7 @@ paint_window() { paint_window_osx_cgcontext(context); } +#endif // __APPLE__ } #ifdef __APPLE__ diff --git a/direct/src/plugin/p3dX11SplashWindow.cxx b/direct/src/plugin/p3dX11SplashWindow.cxx index ae448bf5c2..529c958f70 100755 --- a/direct/src/plugin/p3dX11SplashWindow.cxx +++ b/direct/src/plugin/p3dX11SplashWindow.cxx @@ -854,8 +854,8 @@ make_window() { int y = _wparams.get_win_y(); if (x == -1) x = 0; if (y == -1) y = 0; - if (x == -2) x = 0.5 * (DisplayWidth(_display, _screen) - _win_width); - if (y == -2) y = 0.5 * (DisplayHeight(_display, _screen) - _win_height); + if (x == -2) x = (int)(0.5 * (DisplayWidth(_display, _screen) - _win_width)); + if (y == -2) y = (int)(0.5 * (DisplayHeight(_display, _screen) - _win_height)); if (_wparams.get_window_type() == P3D_WT_embedded) { // Create an embedded window. diff --git a/direct/src/plugin/p3d_plugin.h b/direct/src/plugin/p3d_plugin.h index 37e84f307f..83815b444e 100644 --- a/direct/src/plugin/p3d_plugin.h +++ b/direct/src/plugin/p3d_plugin.h @@ -975,7 +975,9 @@ typedef struct { unsigned short keyCode; } key; struct { +#ifdef __APPLE__ CGContextRef context; +#endif // __APPLE__ double x; double y; double width;