diff options
author | Tim Angus <tim@ngus.net> | 2007-10-02 21:29:25 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2007-10-02 21:29:25 +0000 |
commit | dd0dd03f6f94a15b8764973e4c893526d8cfd722 (patch) | |
tree | 4a3989e08a16d58e6b4f9fda7380e20ba05b8a28 /src/sdl | |
parent | e6513f95705560250f00f1ccc0707e01e318192f (diff) |
* Merge of ioq3-r1189
+ Fix bug that prevented key up events getting to cgame/ui when not in game
+ Use Key_[GS]etCatcher everywhere to set keycatcher
+ Clear all key states when the catcher changes
* Slim down client userinfo somewhat
* Remove some redundant client autocomplete commands
* Actually make use of "menuStack" in the UI module
+ No longer close all menus when exiting one, instead reverting to the
next one on the stack
+ Cleanup the menu activation functions a little
* Truncate text in list columns if it exceeds the column width
* Remove maxChars field from columns member of ITEM_TYPE_LISTBOX
* Revert r992 due to more general and less buggy/hacky fix from ioq3
Diffstat (limited to 'src/sdl')
-rw-r--r-- | src/sdl/sdl_gamma.c | 28 | ||||
-rw-r--r-- | src/sdl/sdl_glimp.c | 2 | ||||
-rw-r--r-- | src/sdl/sdl_input.c | 4 |
3 files changed, 18 insertions, 16 deletions
diff --git a/src/sdl/sdl_gamma.c b/src/sdl/sdl_gamma.c index 70e00b25..0b63b85a 100644 --- a/src/sdl/sdl_gamma.c +++ b/src/sdl/sdl_gamma.c @@ -48,23 +48,25 @@ void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned #include <windows.h> // Win2K and newer put this odd restriction on gamma ramps... - OSVERSIONINFO vinfo; - - vinfo.dwOSVersionInfoSize = sizeof( vinfo ); - GetVersionEx( &vinfo ); - if( vinfo.dwMajorVersion >= 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) { - Com_DPrintf( "performing gamma clamp.\n" ); - for( j = 0 ; j < 3 ; j++ ) + OSVERSIONINFO vinfo; + + vinfo.dwOSVersionInfoSize = sizeof( vinfo ); + GetVersionEx( &vinfo ); + if( vinfo.dwMajorVersion >= 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) { - for( i = 0 ; i < 128 ; i++ ) + Com_DPrintf( "performing gamma clamp.\n" ); + for( j = 0 ; j < 3 ; j++ ) { - if( table[ j ] [ i] > ( ( 128 + i ) << 8 ) ) - table[ j ][ i ] = ( 128 + i ) << 8; - } + for( i = 0 ; i < 128 ; i++ ) + { + if( table[ j ] [ i] > ( ( 128 + i ) << 8 ) ) + table[ j ][ i ] = ( 128 + i ) << 8; + } - if( table[ j ] [127 ] > 254 << 8 ) - table[ j ][ 127 ] = 254 << 8; + if( table[ j ] [127 ] > 254 << 8 ) + table[ j ][ 127 ] = 254 << 8; + } } } #endif diff --git a/src/sdl/sdl_glimp.c b/src/sdl/sdl_glimp.c index a980b0ed..1f5c3434 100644 --- a/src/sdl/sdl_glimp.c +++ b/src/sdl/sdl_glimp.c @@ -115,6 +115,7 @@ static int GLimp_SetMode( int mode, qboolean fullscreen ) int tcolorbits, tdepthbits, tstencilbits; int i = 0; SDL_Surface *vidscreen = NULL; + Uint32 flags = SDL_OPENGL; ri.Printf( PRINT_ALL, "Initializing OpenGL display\n"); @@ -127,7 +128,6 @@ static int GLimp_SetMode( int mode, qboolean fullscreen ) } ri.Printf( PRINT_ALL, " %d %d\n", glConfig.vidWidth, glConfig.vidHeight); - Uint32 flags = SDL_OPENGL; if (fullscreen) { flags |= SDL_FULLSCREEN; diff --git a/src/sdl/sdl_input.c b/src/sdl/sdl_input.c index 6ad660bc..1e2ca988 100644 --- a/src/sdl/sdl_input.c +++ b/src/sdl/sdl_input.c @@ -651,7 +651,7 @@ static void IN_ProcessEvents( void ) if( !SDL_WasInit( SDL_INIT_VIDEO ) ) return; - if( cls.keyCatchers == 0 && keyRepeatEnabled ) + if( Key_GetCatcher( ) == 0 && keyRepeatEnabled ) { SDL_EnableKeyRepeat( 0, 0 ); keyRepeatEnabled = qfalse; @@ -730,7 +730,7 @@ void IN_Frame (void) IN_JoyMove( ); // Release the mouse if the console if down and we're windowed - if( ( cls.keyCatchers & KEYCATCH_CONSOLE ) && !r_fullscreen->integer ) + if( ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) && !r_fullscreen->integer ) IN_DeactivateMouse( ); else IN_ActivateMouse( ); |