summaryrefslogtreecommitdiff
path: root/stateview.c
diff options
context:
space:
mode:
Diffstat (limited to 'stateview.c')
-rw-r--r--stateview.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/stateview.c b/stateview.c
index 6da765e..d806171 100644
--- a/stateview.c
+++ b/stateview.c
@@ -14,11 +14,21 @@ int main(int argc, char ** argv)
fprintf(stderr, "Failed to open %s\n", argv[1]);
exit(1);
}
+ int width = 320;
+ int height = 240;
+ if (argc > 2) {
+ width = atoi(argv[2]);
+ if (argc > 3) {
+ height = atoi(argv[3]);
+ } else {
+ height = (width/320) * 240;
+ }
+ }
vdp_context context;
init_vdp_context(&context);
vdp_load_savestate(&context, state_file);
vdp_run_to_vblank(&context);
- render_init();
+ render_init(width, height);
render_context(&context);
render_wait_quit();
return 0;