1 /* Mednafen - Multi-system Emulator
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17
18 #include <stdint.h>
19 #include <string.h>
20
21 #include "settings.h"
22
23 uint32_t setting_vb_lcolor=0xFF0000;
24 uint32_t setting_vb_rcolor=0x000000;
25 uint32_t setting_vb_anaglyph_preset=0;
26 bool setting_vb_right_analog_to_digital=false;
27 bool setting_vb_right_invert_x=false;
28 bool setting_vb_right_invert_y=false;
29 uint32_t setting_vb_cpu_emulation=0;
30 uint32_t setting_vb_3dmode=0;
31 uint32_t setting_vb_liprescale=1;
32 uint32_t setting_vb_default_color=0xFFFFFF;
33
MDFN_GetSettingUI(const char * name)34 uint64_t MDFN_GetSettingUI(const char *name)
35 {
36 if (!strcmp("vb.anaglyph.lcolor", name))
37 return setting_vb_lcolor;
38 if (!strcmp("vb.anaglyph.rcolor", name))
39 return setting_vb_rcolor;
40 if (!strcmp("vb.3dmode", name))
41 return setting_vb_3dmode;
42 if (!strcmp("vb.liprescale", name))
43 return setting_vb_liprescale;
44 if (!strcmp("vb.default_color", name))
45 return setting_vb_default_color;
46 return 0;
47 }
48
MDFN_GetSettingI(const char * name)49 int64_t MDFN_GetSettingI(const char *name)
50 {
51 if (!strcmp("vb.anaglyph.preset", name))
52 return setting_vb_anaglyph_preset;
53 if (!strcmp("vb.cpu_emulation", name))
54 return setting_vb_cpu_emulation;
55 return 0;
56 }
57
MDFN_GetSettingB(const char * name)58 bool MDFN_GetSettingB(const char *name)
59 {
60 if (!strcmp("cheats", name))
61 return 0;
62 /* LIBRETRO */
63 if (!strcmp("vb.instant_display_hack", name))
64 return 1;
65 if (!strcmp("vb.allow_draw_skip", name))
66 return 1;
67 return 0;
68 }
69