Browse Source

build issues

David Rose 16 years ago
parent
commit
2fecaa6173

+ 2 - 0
direct/src/plugin/p3dInstance.cxx

@@ -2974,6 +2974,7 @@ set_install_label(const string &install_label) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void P3DInstance::
 void P3DInstance::
 paint_window() {
 paint_window() {
+#ifdef __APPLE__
   const P3D_window_handle &handle = _wparams.get_parent_window();
   const P3D_window_handle &handle = _wparams.get_parent_window();
   if (handle._window_handle_type == P3D_WHT_osx_port) {
   if (handle._window_handle_type == P3D_WHT_osx_port) {
     paint_window_osx_port();
     paint_window_osx_port();
@@ -2985,6 +2986,7 @@ paint_window() {
 
 
     paint_window_osx_cgcontext(context);
     paint_window_osx_cgcontext(context);
   }
   }
+#endif  // __APPLE__
 }
 }
 
 
 #ifdef __APPLE__
 #ifdef __APPLE__

+ 2 - 2
direct/src/plugin/p3dX11SplashWindow.cxx

@@ -854,8 +854,8 @@ make_window() {
   int y = _wparams.get_win_y();
   int y = _wparams.get_win_y();
   if (x == -1) x = 0;
   if (x == -1) x = 0;
   if (y == -1) y = 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) {
   if (_wparams.get_window_type() == P3D_WT_embedded) {
     // Create an embedded window.
     // Create an embedded window.

+ 2 - 0
direct/src/plugin/p3d_plugin.h

@@ -975,7 +975,9 @@ typedef struct {
       unsigned short keyCode;
       unsigned short keyCode;
     } key;
     } key;
     struct {
     struct {
+#ifdef __APPLE__
       CGContextRef context;
       CGContextRef context;
+#endif  // __APPLE__
       double x;
       double x;
       double y;
       double y;
       double width;
       double width;