shithub: zelda3

Download patch

ref: 4a1b6ea93ac72c1abd6890f59c6b5d5c5a32f0af
parent: 3870ca7517f18856e5e3eba9d067fb07fd97b7d2
author: Patrick Mollohan <[email protected]>
date: Sat Sep 10 06:12:22 EDT 2022

Hide cursor when in fullscreen (#77)


--- a/main.c
+++ b/main.c
@@ -57,7 +57,7 @@
 static uint32 g_win_flags = SDL_WINDOW_RESIZABLE;
 static SDL_Window *g_window;
 static SDL_Renderer *g_renderer;
-static uint8 g_paused, g_turbo = true;
+static uint8 g_paused, g_turbo = true, g_cursor = true;
 static int current_zoom = kDefaultZoom;
 static uint8 g_gamepad_buttons;
 
@@ -427,6 +427,8 @@
     case kKeys_Fullscreen:
       g_win_flags ^= SDL_WINDOW_FULLSCREEN_DESKTOP;
       SDL_SetWindowFullscreen(g_window, g_win_flags & SDL_WINDOW_FULLSCREEN_DESKTOP);
+      g_cursor = !g_cursor;
+      SDL_ShowCursor(g_cursor);
       break;
     case kKeys_Reset:
       snes_reset(g_snes, true);