Skip to content

Commit a7fa141

Browse files
committed
sdl3: Fix implicit conversion 'bool' -> 'int'
1 parent 2ac5a11 commit a7fa141

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sdl/window.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Window::Window(const std::string& title, int width, int height, const bool fulls
9191

9292
if (isMultisampleSupported_) {
9393
int openglMSAA;
94-
if (SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &openglMSAA) != 0) {
94+
if (SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &openglMSAA)) {
9595
internal::debug("Recreating window and OpenGL Context without Anti-Aliasing support.");
9696
SDL_GL_DestroyContext(impl->context);
9797
SDL_DestroyWindow(impl->sdlWindow);
@@ -235,7 +235,7 @@ void Window::UpdateInput() {
235235
SDL_SetCursor(impl->sdlCursor.get());
236236
}
237237
SDL_Event event;
238-
while (SDL_PollEvent(&event) != 0) {
238+
while (SDL_PollEvent(&event)) {
239239
switch (event.type) {
240240
case SDL_EVENT_QUIT:
241241
quit();
@@ -319,7 +319,7 @@ void Window::UpdateInput() {
319319
break;
320320
case SDL_EVENT_KEY_DOWN: {
321321
static bool wasFullscreen = fullscreen_;
322-
if (event.key.repeat != 0u && fullscreen_ != wasFullscreen) {
322+
if (event.key.repeat && fullscreen_ != wasFullscreen) {
323323
// SDL2 with Xorg has a bug, that it sends a key repeat event when toggling
324324
// fullscreen. So let's ignore the second event
325325
break;

0 commit comments

Comments
 (0)