diff --git a/ion/src/simulator/shared/keyboard_sdl.cpp b/ion/src/simulator/shared/keyboard_sdl.cpp index a75676aaa..64e659df6 100644 --- a/ion/src/simulator/shared/keyboard_sdl.cpp +++ b/ion/src/simulator/shared/keyboard_sdl.cpp @@ -50,8 +50,6 @@ constexpr static KeySDLKeyPair sKeyPairs[] = { constexpr int sNumberOfKeyPairs = sizeof(sKeyPairs)/sizeof(KeySDLKeyPair); -static bool previousState = false; - State scan() { // We need to tell SDL to get new state from the host OS SDL_PumpEvents(); diff --git a/ion/src/simulator/shared/main_sdl.cpp b/ion/src/simulator/shared/main_sdl.cpp index 7b85c02ee..a8529e938 100644 --- a/ion/src/simulator/shared/main_sdl.cpp +++ b/ion/src/simulator/shared/main_sdl.cpp @@ -88,6 +88,7 @@ int main(int argc, char * argv[]) { #endif Ion::Simulator::Main::init(); + Ion::Simulator::Haptics::init(); ion_main(arguments.size(), &arguments[0]); @@ -95,16 +96,11 @@ int main(int argc, char * argv[]) { if (!argument_volatile) { savePython(); } - Ion::Simulator::Haptics::init(); - - ion_main(arguments.size(), &arguments[0]); +#endif // Shutdown Ion::Simulator::Haptics::shutdown(); Ion::Simulator::Main::quit(); -#endif - - Ion::Simulator::Main::quit(); if (file_buffer != nullptr) SDL_free(file_buffer); @@ -313,10 +309,8 @@ void refresh() { if (!sNeedsRefresh) { return; } + sNeedsRefresh = false; - #if EPSILON_SDL_SCREEN_ONLY - Display::draw(sRenderer, &sScreenRect); - #else if (argument_screen_only) { Display::draw(sRenderer, &sScreenRect); } else { @@ -329,7 +323,6 @@ void refresh() { Layout::draw(sRenderer); Display::draw(sRenderer, &screenRect); } - #endif SDL_RenderPresent(sRenderer);