From cad99681193f69c04f1125e8ef821e65a1f3c9bb Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 25 Feb 2010 22:11:48 +1300 Subject: [PATCH] fixed OSX usability properly, hopefully --- OpenRa.Gl/GraphicsDevice.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/OpenRa.Gl/GraphicsDevice.cs b/OpenRa.Gl/GraphicsDevice.cs index 0ded13ddae..76ce6581a3 100644 --- a/OpenRa.Gl/GraphicsDevice.cs +++ b/OpenRa.Gl/GraphicsDevice.cs @@ -60,10 +60,17 @@ namespace OpenRa.GlRenderer Sdl.SDL_GL_SetAttribute(Sdl.SDL_GL_ALPHA_SIZE, 8); - // Breaks os x usability - //Environment.SetEnvironmentVariable("SDL_VIDEO_WINDOW_POS", "0,0"); - //surf = Sdl.SDL_SetVideoMode(width, height, 0, Sdl.SDL_NOFRAME | Sdl.SDL_OPENGL | (windowed ? 0 : Sdl.SDL_FULLSCREEN)); - surf = Sdl.SDL_SetVideoMode(width, height, 0, Sdl.SDL_OPENGL | (windowed ? 0 : Sdl.SDL_FULLSCREEN)); + if (Environment.OSVersion.Platform == PlatformID.Win32NT) + { + // pseudo-fullscreen, for sane debugging. + Environment.SetEnvironmentVariable("SDL_VIDEO_WINDOW_POS", "0,0"); + surf = Sdl.SDL_SetVideoMode(width, height, 0, Sdl.SDL_NOFRAME | Sdl.SDL_OPENGL | (windowed ? 0 : Sdl.SDL_FULLSCREEN)); + } + else + { + // OSX doesn't like this, due to quirks of their WM. + surf = Sdl.SDL_SetVideoMode(width, height, 0, Sdl.SDL_OPENGL | (windowed ? 0 : Sdl.SDL_FULLSCREEN)); + } Sdl.SDL_WM_SetCaption("OpenRA", "OpenRA"); Sdl.SDL_ShowCursor(0);