From 137631127943d873e7d701d57f3e02d049fa4a32 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sat, 8 Dec 2012 22:07:25 -0800 Subject: Add support for simple resolution scaling --- stateview.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'stateview.c') 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; -- cgit v1.2.3