aboutsummaryrefslogtreecommitdiff
path: root/src/menu.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-08 22:35:16 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-08 22:35:16 +0100
commit8871729a65615df0eab213bbbf942abe75771704 (patch)
tree34a4ab0f412c34383799e14816d1dfe288705085 /src/menu.c
parent5ae0b6490f5fd138f4cbf5c084680bb03b2fff05 (diff)
downloadgold-mine-run-8871729a65615df0eab213bbbf942abe75771704.tar.gz
gold-mine-run-8871729a65615df0eab213bbbf942abe75771704.zip
Avoid drawing the whole screen on each frame
This allows supporting 386DX "just about" (there will be flickering).
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c8
1 files changed, 5 insertions, 3 deletions
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();
}
}