mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-19 19:28:28 +00:00
Disable raw keyboard input by default
It interferes with keyboard hooks and most applications don't expect key events coming from another thread
This commit is contained in:
parent
73879ef26e
commit
a9a51cebde
2 changed files with 3 additions and 3 deletions
|
@ -3464,8 +3464,8 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* The variable can be set to the following values:
|
* The variable can be set to the following values:
|
||||||
*
|
*
|
||||||
* - "0": The Windows message loop is used for keyboard events.
|
* - "0": The Windows message loop is used for keyboard events. (default)
|
||||||
* - "1": Low latency raw keyboard events are used. (default)
|
* - "1": Low latency raw keyboard events are used.
|
||||||
*
|
*
|
||||||
* This hint can be set anytime.
|
* This hint can be set anytime.
|
||||||
*
|
*
|
||||||
|
|
|
@ -54,7 +54,7 @@ SDL_bool g_WindowFrameUsableWhileCursorHidden = SDL_TRUE;
|
||||||
static void SDLCALL UpdateWindowsRawKeyboard(void *userdata, const char *name, const char *oldValue, const char *newValue)
|
static void SDLCALL UpdateWindowsRawKeyboard(void *userdata, const char *name, const char *oldValue, const char *newValue)
|
||||||
{
|
{
|
||||||
SDL_VideoDevice *_this = (SDL_VideoDevice *)userdata;
|
SDL_VideoDevice *_this = (SDL_VideoDevice *)userdata;
|
||||||
SDL_bool enabled = SDL_GetStringBoolean(newValue, SDL_TRUE);
|
SDL_bool enabled = SDL_GetStringBoolean(newValue, SDL_FALSE);
|
||||||
WIN_SetRawKeyboardEnabled(_this, enabled);
|
WIN_SetRawKeyboardEnabled(_this, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue