From d7444b8ca161cd4c3d50493f80f1bcaaeb441ecd Mon Sep 17 00:00:00 2001 From: cmf028 Date: Fri, 20 Sep 2013 20:05:31 -0500 Subject: [PATCH 1/3] Don't set the window title twice --- code/sdl/sdl_glimp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index 281d8ec9..22e70178 100644 --- a/code/sdl/sdl_glimp.c +++ b/code/sdl/sdl_glimp.c @@ -439,7 +439,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder) } } - SDL_SetWindowTitle( SDL_window, CLIENT_WINDOW_TITLE ); SDL_SetWindowIcon( SDL_window, icon ); if( ( SDL_glContext = SDL_GL_CreateContext( SDL_window ) ) == NULL ) From 7d83bba2d02973528eaecf5f3464c2bbe9728487 Mon Sep 17 00:00:00 2001 From: cmf028 Date: Fri, 20 Sep 2013 20:06:28 -0500 Subject: [PATCH 2/3] Set com_minimized to 0 when the window is restored --- code/sdl/sdl_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c index d49b2d51..520d5e81 100644 --- a/code/sdl/sdl_input.c +++ b/code/sdl/sdl_input.c @@ -836,6 +836,7 @@ static void IN_ProcessEvents( void ) break; case SDL_WINDOWEVENT_MINIMIZED: Cvar_SetValue( "com_minimized", 1 ); break; + case SDL_WINDOWEVENT_RESTORED: case SDL_WINDOWEVENT_MAXIMIZED: Cvar_SetValue( "com_minimized", 0 ); break; case SDL_WINDOWEVENT_FOCUS_LOST: Cvar_SetValue( "com_unfocused", 1 ); break; case SDL_WINDOWEVENT_FOCUS_GAINED: Cvar_SetValue( "com_unfocused", 0 ); break; From 11c3bed74d0c2a0316302803b15176fe0f22e1a3 Mon Sep 17 00:00:00 2001 From: cmf028 Date: Fri, 20 Sep 2013 20:12:17 -0500 Subject: [PATCH 3/3] Send key up events for the mouse wheel Previous versions of SDL would send SDL_MOUSEBUTTONUP events for the mouse wheel immediately following the corresponding SDL_MOUSEBUTTONDOWN event --- code/sdl/sdl_input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c index 520d5e81..814550c1 100644 --- a/code/sdl/sdl_input.c +++ b/code/sdl/sdl_input.c @@ -807,9 +807,15 @@ static void IN_ProcessEvents( void ) case SDL_MOUSEWHEEL: if( e.wheel.y > 0 ) + { Com_QueueEvent( 0, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, K_MWHEELUP, qfalse, 0, NULL ); + } else + { Com_QueueEvent( 0, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL ); + } break; case SDL_QUIT: