0, //SDLK_LMETA = 310,
0, //SDLK_LSUPER = 311, /* Left "Windows" key */
0, //SDLK_RSUPER = 312, /* Right "Windows" key */
- 0, //SDLK_MODE = 313, /* "Alt Gr" key */
+ K_ALT, //SDLK_MODE = 313, /* "Alt Gr" key */
0, //SDLK_COMPOSE = 314, /* Multi-key compose key */
0, //SDLK_HELP = 315,
0, //SDLK_PRINT = 316,
void Sys_SendKeyEvents( void )
{
+ static qboolean sound_active = true;
SDL_Event event;
while( SDL_PollEvent( &event ) )
Key_Event( buttonremap[event.button.button - 1], 0, false );
break;
}
+
+ // enable/disable sound on focus gain/loss
+ if (!vid_activewindow && sound_active)
+ {
+ S_BlockSound ();
+ sound_active = false;
+ }
+ else if (vid_activewindow && !sound_active)
+ {
+ S_UnblockSound ();
+ sound_active = true;
+ }
}
/////////////////
Uint8 appstate;
qboolean vid_usemouse;
- if (r_speeds.integer || gl_finish.integer)
- qglFinish();
- SDL_GL_SwapBuffers();
-
//react on appstate changes
appstate = SDL_GetAppState();
vid_activewindow = true;
vid_usemouse = false;
- if( allowmousegrab && vid_mouse.integer && !key_consoleactive && !cls.demoplayback )
+ if( allowmousegrab && vid_mouse.integer && !key_consoleactive && (key_dest != key_game || !cls.demoplayback) )
vid_usemouse = true;
if( vid_isfullscreen )
vid_usemouse = true;
IN_Activate(vid_usemouse);
VID_UpdateGamma(false, 256);
+
+ if (r_render.integer && !vid_hidden)
+ {
+ CHECKGLERROR
+ if (r_speeds.integer || gl_finish.integer)
+ {
+ qglFinish();CHECKGLERROR
+ }
+ SDL_GL_SwapBuffers();
+ }
}