mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-13 14:58:14 +00:00
Code cleanup now that SDL_bool is equivalent to a C boolean expression
This commit is contained in:
@@ -2273,7 +2273,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
/* Ctrl-G toggle mouse grab */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
if (window) {
|
||||
SDL_SetWindowGrab(window, !SDL_GetWindowGrab(window) ? SDL_TRUE : SDL_FALSE);
|
||||
SDL_SetWindowGrab(window, !SDL_GetWindowGrab(window));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2282,7 +2282,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
/* Ctrl-K toggle keyboard grab */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
if (window) {
|
||||
SDL_SetWindowKeyboardGrab(window, !SDL_GetWindowKeyboardGrab(window) ? SDL_TRUE : SDL_FALSE);
|
||||
SDL_SetWindowKeyboardGrab(window, !SDL_GetWindowKeyboardGrab(window));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2311,7 +2311,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
case SDLK_r:
|
||||
if (withControl) {
|
||||
/* Ctrl-R toggle mouse relative mode */
|
||||
SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode() ? SDL_TRUE : SDL_FALSE);
|
||||
SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode());
|
||||
}
|
||||
break;
|
||||
case SDLK_t:
|
||||
|
Reference in New Issue
Block a user