Browse Source

make switch statement an if statement

master
blackle 1 year ago
parent
commit
6ecfc7a26e
1 changed files with 3 additions and 8 deletions
  1. +3
    -8
      sdl2-opengl.c

+ 3
- 8
sdl2-opengl.c View File

@@ -102,14 +102,9 @@ void _start() {
asm volatile(".att_syntax prefix");
__builtin_unreachable();
}
if (Event.type == SDL_WINDOWEVENT) {
switch(Event.window.event) {
case SDL_WINDOWEVENT_EXPOSED:
on_render();
SDL_GL_SwapWindow(mainwindow);
default:
break;
}
if (Event.type == SDL_WINDOWEVENT && Event.window.event == SDL_WINDOWEVENT_EXPOSED) {
on_render();
SDL_GL_SwapWindow(mainwindow);
}
}
}


Loading…
Cancel
Save