aboutsummaryrefslogtreecommitdiffstats
path: root/src/ppu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ppu.c')
-rw-r--r--src/ppu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ppu.c b/src/ppu.c
index 38b27e6..bedf02d 100644
--- a/src/ppu.c
+++ b/src/ppu.c
@@ -22,12 +22,17 @@
22 WITH REGARD TO THIS SOFTWARE. 22 WITH REGARD TO THIS SOFTWARE.
23 */ 23 */
24 24
25// Parameters.
26static int zoom = 2;
27static int frames_per_update = 5;
28static int blits_per_refresh = 60 * 5;
29
25static size_t screen_width = 0; 30static size_t screen_width = 0;
26static size_t screen_height = 0; 31static size_t screen_height = 0;
27static size_t bpp = 0; 32static size_t bpp = 0;
28static int fb_file = 0; 33static int fb_file = 0;
29static int refresh_file = 0; 34static int refresh_file = 0;
30static int zoom = 2; 35static frames_refresh = 0;
31 36
32static u8 *framebuffer = 0; 37static u8 *framebuffer = 0;
33 38
@@ -242,5 +247,12 @@ blit_framebuffer(void) {
242 } 247 }
243 dirty_lines[j] = 0; 248 dirty_lines[j] = 0;
244 } 249 }
250 // NOTE: Maybe this should happen on blit_framebuffer depending on
251 // the number of actual updates (uxn applications that don't modify
252 // the framebuffer shouldn't have to blink).
253 if (++frames_refresh > blits_per_refresh) {
254 write(refresh_file, "1", 1);
255 frames_refresh = 0;
256 }
245 reqdraw = 0; 257 reqdraw = 0;
246} 258}