Clear screen on debugger toggle

This commit is contained in:
neauoire 2023-10-25 15:23:56 -07:00
parent d97fa9e8b8
commit 5babd72e6a
1 changed files with 10 additions and 1 deletions

View File

@ -203,10 +203,19 @@ set_fullscreen(int value, int win)
static void static void
set_borderless(int value) set_borderless(int value)
{ {
if(fullscreen) return;
borderless = value; borderless = value;
SDL_SetWindowBordered(emu_window, !value); SDL_SetWindowBordered(emu_window, !value);
} }
static void
set_debugger(Uxn *u, int value)
{
u->dev[0x0e] = value;
screen_fill(uxn_screen.fg, 0, 0, uxn_screen.width, uxn_screen.height, 0);
screen_redraw(u);
}
/* emulator primitives */ /* emulator primitives */
int int
@ -403,7 +412,7 @@ handle_events(Uxn *u)
else if(event.key.keysym.sym == SDLK_F1) else if(event.key.keysym.sym == SDLK_F1)
set_zoom(zoom == 3 ? 1 : zoom + 1, 1); set_zoom(zoom == 3 ? 1 : zoom + 1, 1);
else if(event.key.keysym.sym == SDLK_F2) else if(event.key.keysym.sym == SDLK_F2)
u->dev[0x0e] = !u->dev[0x0e]; set_debugger(u, !u->dev[0x0e]);
else if(event.key.keysym.sym == SDLK_F3) else if(event.key.keysym.sym == SDLK_F3)
capture_screen(); capture_screen();
else if(event.key.keysym.sym == SDLK_F4) else if(event.key.keysym.sym == SDLK_F4)