summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test.c b/test.c
index 929bdd5..c74bf28 100644
--- a/test.c
+++ b/test.c
@@ -9,7 +9,8 @@
#include "lodepng.h"
#include "gb.h"
-#define NUM_FRAMES 600
+#define SKIP_FRAMES 600
+#define NUM_FRAMES 60
// #define SKIP_STEPS 1000000
#define NUM_STEPS 300000
#define UNUSED(a) ((void) (a))
@@ -187,13 +188,18 @@ test_render_frames(
gb_init(&ctx, NULL, rom_data, rom_size);
fprintf(stderr, "gb context initialized\n");
+ for (size_t i = 0; i < SKIP_FRAMES; i++) {
+ // render frame
+ gb_frame(&ctx);
+ }
+
// render frames
- for (size_t j = 0; j < NUM_FRAMES; j++) {
+ for (size_t i = 0; i < NUM_FRAMES; i++) {
// render frame
gb_frame(&ctx);
// copy frame to buffer
- memcpy(frames + GB_FB_SIZE * j, gb_get_frame(&ctx), GB_FB_SIZE);
+ memcpy(frames + GB_FB_SIZE * i, gb_get_frame(&ctx), GB_FB_SIZE);
}
// save png