Code cleanup now that SDL_bool is equivalent to a C boolean expression
This commit is contained in:
parent
a76d8e39aa
commit
f3261fedcc
53 changed files with 133 additions and 138 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue