1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
/*
Copyright 2016-2022 melonDS team
This file is part of melonDS.
melonDS is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with melonDS. If not, see http://www.gnu.org/licenses/.
*/
#ifndef PLATFORMCONFIG_H
#define PLATFORMCONFIG_H
#include <variant>
#include <string>
enum
{
HK_Lid = 0,
HK_Mic,
HK_Pause,
HK_Reset,
HK_FastForward,
HK_FastForwardToggle,
HK_FullscreenToggle,
HK_SwapScreens,
HK_SwapScreenEmphasis,
HK_SolarSensorDecrease,
HK_SolarSensorIncrease,
HK_FrameStep,
HK_MAX
};
enum
{
screenSizing_Even,
screenSizing_EmphTop,
screenSizing_EmphBot,
screenSizing_Auto,
screenSizing_TopOnly,
screenSizing_BotOnly,
screenSizing_MAX,
};
namespace Config
{
struct ConfigEntry
{
char Name[32];
int Type; // 0=int 1=bool 2=string
void* Value; // pointer to the value variable
std::variant<int, bool, std::string> Default;
bool InstanceUnique; // whether the setting can exist individually for each instance in multiplayer
};
struct CameraConfig
{
int InputType; // 0=blank 1=image 2=camera
std::string ImagePath;
std::string CamDeviceName;
bool XFlip;
};
extern int KeyMapping[12];
extern int JoyMapping[12];
extern int HKKeyMapping[HK_MAX];
extern int HKJoyMapping[HK_MAX];
extern int JoystickID;
extern int WindowWidth;
extern int WindowHeight;
extern bool WindowMaximized;
extern int ScreenRotation;
extern int ScreenGap;
extern int ScreenLayout;
extern bool ScreenSwap;
extern int ScreenSizing;
extern int ScreenAspectTop;
extern int ScreenAspectBot;
extern bool IntegerScaling;
extern bool ScreenFilter;
extern bool ScreenUseGL;
extern bool ScreenVSync;
extern int ScreenVSyncInterval;
extern int _3DRenderer;
extern bool Threaded3D;
extern int GL_ScaleFactor;
extern bool GL_BetterPolygons;
extern bool LimitFPS;
extern bool AudioSync;
extern bool ShowOSD;
extern int ConsoleType;
extern bool DirectBoot;
#ifdef JIT_ENABLED
extern bool JIT_Enable;
extern int JIT_MaxBlockSize;
extern bool JIT_BranchOptimisations;
extern bool JIT_LiteralOptimisations;
extern bool JIT_FastMemory;
#endif
extern bool ExternalBIOSEnable;
extern std::string BIOS9Path;
extern std::string BIOS7Path;
extern std::string FirmwarePath;
extern std::string DSiBIOS9Path;
extern std::string DSiBIOS7Path;
extern std::string DSiFirmwarePath;
extern std::string DSiNANDPath;
extern bool DLDIEnable;
extern std::string DLDISDPath;
extern int DLDISize;
extern bool DLDIReadOnly;
extern bool DLDIFolderSync;
extern std::string DLDIFolderPath;
extern bool DSiSDEnable;
extern std::string DSiSDPath;
extern int DSiSDSize;
extern bool DSiSDReadOnly;
extern bool DSiSDFolderSync;
extern std::string DSiSDFolderPath;
extern bool FirmwareOverrideSettings;
extern std::string FirmwareUsername;
extern int FirmwareLanguage;
extern int FirmwareBirthdayMonth;
extern int FirmwareBirthdayDay;
extern int FirmwareFavouriteColour;
extern std::string FirmwareMessage;
extern std::string FirmwareMAC;
extern int MPAudioMode;
extern int MPRecvTimeout;
extern std::string LANDevice;
extern bool DirectLAN;
extern bool SavestateRelocSRAM;
extern int AudioInterp;
extern int AudioBitrate;
extern int AudioVolume;
extern int MicInputType;
extern std::string MicWavPath;
extern std::string LastROMFolder;
extern std::string LastBIOSFolder;
extern std::string RecentROMList[10];
extern std::string SaveFilePath;
extern std::string SavestatePath;
extern std::string CheatFilePath;
extern bool EnableCheats;
extern bool MouseHide;
extern int MouseHideSeconds;
extern bool PauseLostFocus;
extern bool DSBatteryLevelOkay;
extern int DSiBatteryLevel;
extern bool DSiBatteryCharging;
extern CameraConfig Camera[2];
void Load();
void Save();
}
#endif // PLATFORMCONFIG_H
|