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 <boolean.h>
19
20 #include <errno.h>
21 #include <string.h>
22 #include "settings.h"
23
24 int setting_initial_scanline = 0;
25 int setting_last_scanline = 242;
26 int setting_pce_hoverscan = 352;
27 int setting_pce_fast_nospritelimit = 0;
28 int setting_pce_overclocked = 1;
29 int setting_pce_fast_cddavolume = 100;
30 int setting_pce_fast_adpcmvolume = 100;
31 int setting_pce_fast_cdpsgvolume = 100;
32 uint32_t setting_pce_fast_cdspeed = 1;
33 bool OrderOfGriffonFix = false;
34
MDFN_GetSettingUI(const char * name)35 uint64_t MDFN_GetSettingUI(const char *name)
36 {
37 if (!strcmp("pce_fast.cddavolume", name))
38 return setting_pce_fast_cddavolume;
39 if (!strcmp("pce_fast.adpcmvolume", name))
40 return setting_pce_fast_adpcmvolume;
41 if (!strcmp("pce_fast.cdpsgvolume", name))
42 return setting_pce_fast_cdpsgvolume;
43 if (!strcmp("pce_fast.cdspeed", name))
44 return setting_pce_fast_cdspeed;
45 if (!strcmp("pce_fast.ocmultiplier", name))
46 return setting_pce_overclocked;
47 if (!strcmp("pce_fast.slstart", name))
48 return setting_initial_scanline;
49 if (!strcmp("pce_fast.slend", name))
50 return setting_last_scanline;
51 if (!strcmp("pce_fast.hoverscan", name))
52 return setting_pce_hoverscan;
53
54 return 0;
55 }
56
MDFN_GetSettingF(const char * name)57 double MDFN_GetSettingF(const char *name)
58 {
59 /* TODO/FIXME - handle 'pce_fast.mouse_sensitivity' */
60 return 0;
61 }
62
MDFN_GetSettingB(const char * name)63 bool MDFN_GetSettingB(const char *name)
64 {
65 if (!strcmp("cheats", name))
66 #ifndef USE_CHEATS
67 return 0;
68 #else
69 return 1;
70 #endif
71 /* LIBRETRO */
72 if (!strcmp("libretro.cd_load_into_ram", name))
73 return 0;
74 if (!strcmp("pce_fast.input.multitap", name))
75 return 1;
76 if (!strcmp("pce_fast.arcadecard", name))
77 return 1;
78 if (!strcmp("pce_fast.nospritelimit", name))
79 return setting_pce_fast_nospritelimit;
80 if (!strcmp("pce_fast.forcemono", name))
81 return 0;
82 if (!strcmp("pce_fast.disable_softreset", name))
83 return 0;
84 if (!strcmp("pce_fast.adpcmlp", name))
85 return 0;
86 return 0;
87 }
88