diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-07-01 20:59:54 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-07-01 20:59:54 +0000 |
commit | 67d0be6741c5466c786d8d389e34c83e1be7e3c0 (patch) | |
tree | c0c24fa17a8940746d92f5ecfc9a20cd7ff860e6 | |
parent | 9136f3b9b504cbae256c47a8e340e94076f34db0 (diff) | |
download | usdx-67d0be6741c5466c786d8d389e34c83e1be7e3c0.tar.gz usdx-67d0be6741c5466c786d8d389e34c83e1be7e3c0.tar.xz usdx-67d0be6741c5466c786d8d389e34c83e1be7e3c0.zip |
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
-rw-r--r-- | Game/Code/Classes/UMain.pas | 11 |
1 files changed, 5 insertions, 6 deletions
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 |