mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
Set SDL_EnableUNICODE() right after the window is created
This works around a bug in SDL 1.2 were the SDL_EnableUNICODE() state is reset to false after the window is reacreated. Setting it in the render backend ensures that no keystrokes are lost. This fixes #56.
This commit is contained in:
parent
403d26d520
commit
08f78ec3b5
2 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,6 @@ IN_Init(void)
|
||||||
in_relativemode = (SDL_GetRelativeMouseMode() == SDL_TRUE);
|
in_relativemode = (SDL_GetRelativeMouseMode() == SDL_TRUE);
|
||||||
SDL_StartTextInput();
|
SDL_StartTextInput();
|
||||||
#else
|
#else
|
||||||
SDL_EnableUNICODE(SDL_TRUE);
|
|
||||||
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -344,6 +344,7 @@ static qboolean CreateSDLWindow(int flags)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
window = SDL_SetVideoMode(vid.width, vid.height, 0, flags);
|
window = SDL_SetVideoMode(vid.width, vid.height, 0, flags);
|
||||||
|
SDL_EnableUNICODE(SDL_TRUE);
|
||||||
return window != NULL;
|
return window != NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue