diff options
author | Mike Pavone <pavone@retrodev.com> | 2012-12-08 22:07:25 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2012-12-08 22:07:25 -0800 |
commit | 137631127943d873e7d701d57f3e02d049fa4a32 (patch) | |
tree | 3eed81115b427b8be7d7c40b25a2be861c9c04f2 /stateview.c | |
parent | 665afdb4db4b7ebbf302d116109af5cd87bc8188 (diff) |
Add support for simple resolution scaling
Diffstat (limited to 'stateview.c')
-rw-r--r-- | stateview.c | 12 |
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; |