[epsilon] Fix upstream merge

This commit is contained in:
Quentin Guidée
2020-11-03 19:49:43 +01:00
parent 5d50c80604
commit 715ff95cf1
2 changed files with 3 additions and 12 deletions

View File

@@ -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();

View File

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