comparison blastem.c @ 496:6fc71114d145

Extract function to determine executable directory from load_config so it can be used elsewhere
author Mike Pavone <pavone@retrodev.com>
date Mon, 28 Oct 2013 21:48:46 -0700
parents 32f053ad9b02
children e1355aa80f4d
comparison
equal deleted inserted replaced
495:39cad98d2789 496:6fc71114d145
9 #include "mem.h" 9 #include "mem.h"
10 #include "vdp.h" 10 #include "vdp.h"
11 #include "render.h" 11 #include "render.h"
12 #include "blastem.h" 12 #include "blastem.h"
13 #include "gst.h" 13 #include "gst.h"
14 #include "util.h"
14 #include <stdio.h> 15 #include <stdio.h>
15 #include <stdlib.h> 16 #include <stdlib.h>
16 #include <string.h> 17 #include <string.h>
17 18
18 #define BLASTEM_VERSION "0.1.0" 19 #define BLASTEM_VERSION "0.1.0"
1760 { 1761 {
1761 if (argc < 2) { 1762 if (argc < 2) {
1762 fputs("Usage: blastem [OPTIONS] ROMFILE [WIDTH] [HEIGHT]\n", stderr); 1763 fputs("Usage: blastem [OPTIONS] ROMFILE [WIDTH] [HEIGHT]\n", stderr);
1763 return 1; 1764 return 1;
1764 } 1765 }
1765 config = load_config(argv[0]); 1766 set_exe_str(argv[0]);
1767 config = load_config();
1766 detect_region(); 1768 detect_region();
1767 int width = -1; 1769 int width = -1;
1768 int height = -1; 1770 int height = -1;
1769 int debug = 0; 1771 int debug = 0;
1770 int ym_log = 0; 1772 int ym_log = 0;