comparison stateview.c @ 799:0b692b5d154b

Merge
author Michael Pavone <pavone@retrodev.com>
date Sun, 26 Jul 2015 13:25:31 -0700
parents 9aff36a172b2
children 574495372d1c
comparison
equal deleted inserted replaced
798:062a2199daf6 799:0b692b5d154b
5 */ 5 */
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include "vdp.h" 8 #include "vdp.h"
9 #include "render.h" 9 #include "render.h"
10 #include "util.h"
10 #include "blastem.h" 11 #include "blastem.h"
11 12
12 //not used, but referenced by the renderer since it handles input 13 //not used, but referenced by the renderer since it handles input
13 io_port gamepad_1; 14 io_port gamepad_1;
14 io_port gamepad_2; 15 io_port gamepad_2;
59 int headless = 0; 60 int headless = 0;
60 61
61 int main(int argc, char ** argv) 62 int main(int argc, char ** argv)
62 { 63 {
63 if (argc < 2) { 64 if (argc < 2) {
64 fprintf(stderr, "Usage: stateview FILENAME\n"); 65 fatal_error("Usage: stateview FILENAME\n");
65 exit(1);
66 } 66 }
67 FILE * state_file = fopen(argv[1], "rb"); 67 FILE * state_file = fopen(argv[1], "rb");
68 if (!state_file) { 68 if (!state_file) {
69 fprintf(stderr, "Failed to open %s\n", argv[1]); 69 fatal_error("Failed to open %s\n", argv[1]);
70 exit(1);
71 } 70 }
72 config = load_config(argv[0]); 71 config = load_config(argv[0]);
73 int width = -1; 72 int width = -1;
74 int height = -1; 73 int height = -1;
75 if (argc > 2) { 74 if (argc > 2) {