Mercurial > repos > blastem
comparison blastem.c @ 444:cc754a309ead
Add fullscreen support and add a keybinding for exiting the emulator
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 17 Jul 2013 22:26:11 -0700 |
parents | f0631c85a90b |
children | 1e828ed04a7c |
comparison
equal
deleted
inserted
replaced
443:9ac3828ea560 | 444:cc754a309ead |
---|---|
1905 int height = -1; | 1905 int height = -1; |
1906 int debug = 0; | 1906 int debug = 0; |
1907 int ym_log = 0; | 1907 int ym_log = 0; |
1908 FILE *address_log = NULL; | 1908 FILE *address_log = NULL; |
1909 char * statefile = NULL; | 1909 char * statefile = NULL; |
1910 uint8_t fullscreen = 0; | |
1910 for (int i = 2; i < argc; i++) { | 1911 for (int i = 2; i < argc; i++) { |
1911 if (argv[i][0] == '-') { | 1912 if (argv[i][0] == '-') { |
1912 switch(argv[i][1]) { | 1913 switch(argv[i][1]) { |
1913 case 'd': | 1914 case 'd': |
1914 debug = 1; | 1915 debug = 1; |
1915 break; | 1916 break; |
1916 case 'f': | 1917 case 'f': |
1917 frame_limit = 1; | 1918 fullscreen = 1; |
1918 break; | 1919 break; |
1919 case 'l': | 1920 case 'l': |
1920 address_log = fopen("address.log", "w"); | 1921 address_log = fopen("address.log", "w"); |
1921 break; | 1922 break; |
1922 case 'v': | 1923 case 'v': |
1986 if (version_reg & 0x40) { | 1987 if (version_reg & 0x40) { |
1987 mclks_per_frame = MCLKS_LINE * LINES_PAL; | 1988 mclks_per_frame = MCLKS_LINE * LINES_PAL; |
1988 fps = 50; | 1989 fps = 50; |
1989 } | 1990 } |
1990 if (!headless) { | 1991 if (!headless) { |
1991 render_init(width, height, title, fps); | 1992 render_init(width, height, title, fps, fullscreen); |
1992 } | 1993 } |
1993 vdp_context v_context; | 1994 vdp_context v_context; |
1994 | 1995 |
1995 init_vdp_context(&v_context); | 1996 init_vdp_context(&v_context); |
1996 | 1997 |