From 67d0be6741c5466c786d8d389e34c83e1be7e3c0 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 1 Jul 2008 20:59:54 +0000 Subject: Disabled Alt+Tab screen-mode switching for Windows and MacOSX. SDL_SetVideoMode creates a new OpenGL RC (all textures are invalidated) so we have to reload all texture data (-> whitescreen bug or scrambled screen). Only Linux is able to handle screen-switching this way. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1156 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UMain.pas | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index f83830bb..46d86447 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -464,24 +464,23 @@ begin begin Ini.FullScreen := integer( not boolean( Ini.FullScreen ) ); + // FIXME: SDL_SetVideoMode creates a new OpenGL RC so we have to + // reload all texture data (-> whitescreen bug). + // Only Linux is able to handle screen-switching this way. + {$IFDEF LINUX} if boolean( Ini.FullScreen ) then begin SDL_SetVideoMode(ScreenW, ScreenH, (Ini.Depth+1) * 16, SDL_OPENGL or SDL_FULLSCREEN); - // FIXME: SDL_SetVideoMode creates a new OpenGL RC so we have to - // reload all texture data (-> whitescreen bug). - // Only Linux is able to handle screen-switching this way. SDL_ShowCursor(0); end else begin SDL_SetVideoMode(ScreenW, ScreenH, (Ini.Depth+1) * 16, SDL_OPENGL or SDL_RESIZABLE); - // FIXME: SDL_SetVideoMode creates a new OpenGL RC so we have to - // reload all texture data (-> whitescreen bug). - // Only Linux is able to handle screen-switching this way. SDL_ShowCursor(1); end; glViewPort(0, 0, ScreenW, ScreenH); + {$ENDIF} end // if print is pressed -> make screenshot and save to screenshot path else if (Event.key.keysym.sym = SDLK_SYSREQ) or (Event.key.keysym.sym = SDLK_PRINT) then -- cgit v1.2.3