Browse Source

make switch statement an if statement

master
blackle 3 years ago
parent
commit
6ecfc7a26e
  1. 11
      sdl2-opengl.c

11
sdl2-opengl.c

@ -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