mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 01:42:12 +00:00
* (bug 3610) Server sending unnecessary newline with SV_ConSay_F (Tyler Schwend
<TylerSchwend@gmail.com>) * (bug 3623) COMMAND is mapped to the ALT key (Matthias <Kapffer@macbay.de>) * (bug 3665) Typo error in FS_FOpenFileByMode function (TsT <tst2006@gmail.com>) * (bug 3669) Some files left out of Solaris Packages (Vincent Cojot <vincent@cojot.name>) * (bug 3680) server quit messages (Ben Millwood) * (bug 3682) Maps with >1024 models cause a segfault (misantropia <bnoordhuis@gmail.com>) * (bug 3683) R_FindShader(): negative lightmap indexes cause stray pointers (misantropia <bnoordhuis@gmail.com>) * (bug 3688) q3asm potential segfault fix and other changes (TsT <tst2006@gmail.com>) * (bug 3695) Not allowing to write file with lib extention (.dll/.so/...) (TsT <tst2006@gmail.com>) * (bug 3696) make-macosx-ub.sh outdated by revision 1340; test for Tiger not working (Matthias <Kapffer@macbay.de>) * (bug 3698) #error reported as warning in q3cpp (and no #warning support) (Ben Millwood) * (bug 3703) restoring the valued pre-SDL window behaviour (/dev/humancontroller <devhc97@gmail.com>)
This commit is contained in:
parent
956ce9bf12
commit
2c0861c1ce
13 changed files with 145 additions and 73 deletions
|
@ -136,7 +136,8 @@ static const char *IN_TranslateSDLToQ3Key(SDL_keysym *keysym, int *key)
|
|||
case SDLK_RCTRL: *key = K_CTRL; break;
|
||||
|
||||
case SDLK_RMETA:
|
||||
case SDLK_LMETA:
|
||||
case SDLK_LMETA: *key = K_COMMAND; break;
|
||||
|
||||
case SDLK_RALT:
|
||||
case SDLK_LALT: *key = K_ALT; break;
|
||||
|
||||
|
@ -288,18 +289,17 @@ static void IN_ActivateMouse( void )
|
|||
|
||||
if( !mouseActive )
|
||||
{
|
||||
SDL_WM_GrabInput( SDL_GRAB_ON );
|
||||
SDL_ShowCursor( 0 );
|
||||
|
||||
#ifdef MACOS_X_CURSOR_HACK
|
||||
// This is a bug in the current SDL/macosx...have to toggle it a few
|
||||
// times to get the cursor to hide.
|
||||
SDL_ShowCursor( 1 );
|
||||
SDL_ShowCursor( 0 );
|
||||
#endif
|
||||
SDL_WM_GrabInput( SDL_GRAB_ON );
|
||||
}
|
||||
|
||||
// in_nograb makes no sense unless fullscreen
|
||||
// in_nograb makes no sense in fullscreen mode
|
||||
if( !r_fullscreen->integer )
|
||||
{
|
||||
if( in_nograb->modified || !mouseActive )
|
||||
|
@ -347,8 +347,9 @@ static void IN_DeactivateMouse( void )
|
|||
|
||||
if( mouseActive )
|
||||
{
|
||||
SDL_ShowCursor( 1 );
|
||||
SDL_WM_GrabInput( SDL_GRAB_OFF );
|
||||
SDL_WarpMouse( glConfig.vidWidth >> 1, glConfig.vidHeight >> 1 );
|
||||
SDL_ShowCursor( 1 );
|
||||
|
||||
mouseActive = qfalse;
|
||||
}
|
||||
|
@ -719,6 +720,15 @@ static void IN_ProcessEvents( void )
|
|||
}
|
||||
break;
|
||||
|
||||
case SDL_ACTIVEEVENT:
|
||||
if( e.active.state == SDL_APPINPUTFOCUS ) {
|
||||
if( e.active.gain )
|
||||
IN_ActivateMouse();
|
||||
else
|
||||
IN_DeactivateMouse();
|
||||
}
|
||||
break;
|
||||
|
||||
case SDL_QUIT:
|
||||
Sys_Quit();
|
||||
break;
|
||||
|
@ -741,8 +751,10 @@ void IN_Frame (void)
|
|||
{
|
||||
IN_JoyMove( );
|
||||
|
||||
// Release the mouse if the console if down and we're windowed
|
||||
if( ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) && !r_fullscreen->integer )
|
||||
// Release the mouse if the console is down in windowed mode
|
||||
// or if the window loses focus due to task switching
|
||||
if( ( ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) && !r_fullscreen->integer ) ||
|
||||
!( SDL_GetAppState() & SDL_APPINPUTFOCUS ) )
|
||||
IN_DeactivateMouse( );
|
||||
else
|
||||
IN_ActivateMouse( );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue