mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Screw with (de)initialization code.
This fixes: - Mouse grab being lost after alt-enter goes windowed in the SDL driver. - Joystick ceasing to function on vid_restart in the SDL driver. - Audio failing to work after after snd_restart in the SDL driver. - Probably other things.
This commit is contained in:
parent
136557954c
commit
c7392f2c3f
3 changed files with 18 additions and 11 deletions
|
@ -1408,6 +1408,8 @@ void GLimp_Init( void )
|
||||||
|
|
||||||
InitSig();
|
InitSig();
|
||||||
|
|
||||||
|
IN_Init(); // rcg08312005 moved into glimp.
|
||||||
|
|
||||||
// Hack here so that if the UI
|
// Hack here so that if the UI
|
||||||
if ( *r_previousglDriver->string )
|
if ( *r_previousglDriver->string )
|
||||||
{
|
{
|
||||||
|
|
|
@ -452,15 +452,8 @@ void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned
|
||||||
*/
|
*/
|
||||||
void GLimp_Shutdown( void )
|
void GLimp_Shutdown( void )
|
||||||
{
|
{
|
||||||
IN_DeactivateMouse();
|
IN_Shutdown();
|
||||||
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
if (stick)
|
|
||||||
{
|
|
||||||
SDL_JoystickClose(stick);
|
|
||||||
stick = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_Quit();
|
|
||||||
screen = NULL;
|
screen = NULL;
|
||||||
|
|
||||||
memset( &glConfig, 0, sizeof( glConfig ) );
|
memset( &glConfig, 0, sizeof( glConfig ) );
|
||||||
|
@ -886,6 +879,8 @@ void GLimp_Init( void )
|
||||||
|
|
||||||
InitSig();
|
InitSig();
|
||||||
|
|
||||||
|
IN_Init(); // rcg08312005 moved into glimp.
|
||||||
|
|
||||||
// Hack here so that if the UI
|
// Hack here so that if the UI
|
||||||
if ( *r_previousglDriver->string )
|
if ( *r_previousglDriver->string )
|
||||||
{
|
{
|
||||||
|
@ -1209,7 +1204,17 @@ void IN_Init(void) {
|
||||||
|
|
||||||
void IN_Shutdown(void)
|
void IN_Shutdown(void)
|
||||||
{
|
{
|
||||||
|
IN_DeactivateMouse();
|
||||||
|
|
||||||
mouse_avail = qfalse;
|
mouse_avail = qfalse;
|
||||||
|
|
||||||
|
if (stick)
|
||||||
|
{
|
||||||
|
SDL_JoystickClose(stick);
|
||||||
|
stick = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IN_Frame (void) {
|
void IN_Frame (void) {
|
||||||
|
|
|
@ -399,7 +399,7 @@ void Sys_Init(void)
|
||||||
|
|
||||||
Cvar_Set( "username", Sys_GetCurrentUser() );
|
Cvar_Set( "username", Sys_GetCurrentUser() );
|
||||||
|
|
||||||
IN_Init();
|
//IN_Init(); // rcg08312005 moved into glimp.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue