mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 21:17:45 +00:00
Reset rawInputEnableCount when RawInput is not supported
This commit is contained in:
@@ -57,6 +57,9 @@ ToggleRawInput(SDL_bool enabled)
|
|||||||
|
|
||||||
/* (Un)register raw input for mice */
|
/* (Un)register raw input for mice */
|
||||||
if (RegisterRawInputDevices(&rawMouse, 1, sizeof(RAWINPUTDEVICE)) == FALSE) {
|
if (RegisterRawInputDevices(&rawMouse, 1, sizeof(RAWINPUTDEVICE)) == FALSE) {
|
||||||
|
/* Reset the enable count, otherwise subsequent enable calls will
|
||||||
|
believe raw input is enabled */
|
||||||
|
rawInputEnableCount = 0;
|
||||||
|
|
||||||
/* Only return an error when registering. If we unregister and fail,
|
/* Only return an error when registering. If we unregister and fail,
|
||||||
then it's probably that we unregistered twice. That's OK. */
|
then it's probably that we unregistered twice. That's OK. */
|
||||||
|
|||||||
Reference in New Issue
Block a user