Jelajahi Sumber

Add guard for X11 related initializations.

Christopher Reed 12 tahun lalu
induk
melakukan
336ce497de
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      Core/Contents/Source/PolySDLCore.cpp

+ 4 - 2
Core/Contents/Source/PolySDLCore.cpp

@@ -111,12 +111,14 @@ SDLCore::SDLCore(PolycodeView *view, int _xRes, int _yRes, bool fullScreen, bool
 		SDL_JoystickOpen(i);
 		SDL_JoystickOpen(i);
 		input->addJoystick(i);
 		input->addJoystick(i);
 	}
 	}
-	
+
+#ifdef USE_X11
 	// Start listening to clipboard events.
 	// Start listening to clipboard events.
 	// (Yes on X11 you need to actively listen to
 	// (Yes on X11 you need to actively listen to
 	//  clipboard events and respond to them)
 	//  clipboard events and respond to them)
 	init_scrap();
 	init_scrap();
-
+#endif // USE_X11
+	
 	((OpenGLRenderer*)renderer)->Init();
 	((OpenGLRenderer*)renderer)->Init();
 	CoreServices::getInstance()->installModule(new GLSLShaderModule());	
 	CoreServices::getInstance()->installModule(new GLSLShaderModule());	
 }
 }