This commit is contained in:
CocoSimone
2022-08-20 14:38:25 +02:00
parent 7962ae12e3
commit 51c334fc1a
5 changed files with 52 additions and 27 deletions

View File

@@ -4,16 +4,15 @@
void App::Run() {
// Main loop
bool done = false;
const u8* state = SDL_GetKeyboardState(nullptr);
while (!done) {
while (!core.done) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
ImGui_ImplSDL2_ProcessEvent(&event);
switch(event.type) {
case SDL_QUIT: done = true; break;
case SDL_QUIT: core.done = true; break;
case SDL_WINDOWEVENT:
done = window.gotClosed(event);
core.done = window.gotClosed(event);
break;
case SDL_CONTROLLERDEVICEADDED: {
const int index = event.cdevice.which;