uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 5babd72e6a9ca38d055a51e8e3bfe959187ea4b3
parent d97fa9e8b873eaa2f740ab4f9abcf86bd6087079
Author: neauoire <aliceffekt@gmail.com>
Date:   Wed, 25 Oct 2023 15:23:56 -0700

Clear screen on debugger toggle

Diffstat:
Msrc/uxnemu.c | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -203,10 +203,19 @@ set_fullscreen(int value, int win) static void set_borderless(int value) { + if(fullscreen) return; borderless = 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 */ int @@ -403,7 +412,7 @@ handle_events(Uxn *u) else if(event.key.keysym.sym == SDLK_F1) set_zoom(zoom == 3 ? 1 : zoom + 1, 1); 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) capture_screen(); else if(event.key.keysym.sym == SDLK_F4)