ref: 95e3a919dd9490101b9f2b708ce63225c7420845
parent: 97091a94ad0391d17cdc78db85593bfd84f367e7
author: Snesrev <snesrev@protonmail.com>
date: Mon Oct 3 12:31:39 EDT 2022
SDL_RenderPresent may not be called more than once per frame.
--- a/main.c
+++ b/main.c
@@ -561,6 +561,9 @@
case kKeys_Pause: g_paused = !g_paused; break;
case kKeys_PauseDimmed:
g_paused = !g_paused;
+ // SDL_RenderPresent may not be called more than once per frame.
+ // Seems to work on Windows still. Temporary measure until it's fixed.
+#ifdef _WIN32
if (g_paused) {
SDL_SetRenderDrawBlendMode(g_renderer, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(g_renderer, 0, 0, 0, 159);
@@ -567,6 +570,7 @@
SDL_RenderFillRect(g_renderer, NULL);
SDL_RenderPresent(g_renderer);
}
+#endif
break;
case kKeys_ReplayTurbo: g_replay_turbo = !g_replay_turbo; break;
case kKeys_WindowBigger: ChangeWindowScale(1); break;