From 8871729a65615df0eab213bbbf942abe75771704 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 8 Jul 2023 22:35:16 +0100 Subject: Avoid drawing the whole screen on each frame This allows supporting 386DX "just about" (there will be flickering). --- src/menu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/menu.c') diff --git a/src/menu.c b/src/menu.c index 4eeed8e..3d4456e 100644 --- a/src/menu.c +++ b/src/menu.c @@ -63,7 +63,7 @@ static void render_cast() put_text(dst.x + 16 + 8, dst.y + 6, names[i], i + 2); wait_vsync(); - blit_update(); + blit_copy_all(); wait_frames(32); @@ -77,6 +77,7 @@ uint8_t run_menu() uint8_t cast = 0; uint8_t wait; + blit_target(TARGET_BUFFER); while (1) { if (keys[KEY_ESC]) @@ -100,7 +101,7 @@ uint8_t run_menu() } wait_vsync(); - blit_update(); + blit_copy_all(); } /* if is not cast, we do the "blink" effect */ @@ -113,8 +114,9 @@ uint8_t run_menu() wait = 0; put_text(84, 110, "PRESS SPACE TO PLAY", wait ? 0 : 1); + wait_vsync(); - blit_update(); + blit_copy_all(); } } -- cgit v1.2.3