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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
|
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
#include <cstdio>
#include <string>
#include <wx/arrstr.h>
#include <wx/defs.h>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <wx/translation.h>
#include <wx/windowid.h>
#include "Common/CommonTypes.h"
#if defined(HAVE_XRANDR) && HAVE_XRANDR
#include "DolphinWX/X11Utils.h"
#endif
class wxBoxSizer;
class wxButton;
class wxCheckBox;
class wxChoice;
class wxDirPickerCtrl;
class wxFileDirPickerEvent;
class wxFilePickerCtrl;
class wxGridBagSizer;
class wxListBox;
class wxNotebook;
class wxPanel;
class wxRadioBox;
class wxSlider;
class wxSpinCtrl;
class wxSpinEvent;
class wxStaticBoxSizer;
class wxStaticText;
class wxWindow;
class CConfigMain : public wxDialog
{
public:
CConfigMain(wxWindow* parent,
wxWindowID id = 1,
const wxString& title = _("Dolphin Configuration"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
virtual ~CConfigMain();
void OnOk(wxCommandEvent& event);
void CloseClick(wxCommandEvent& event);
void OnSelectionChanged(wxCommandEvent& event);
void OnConfig(wxCommandEvent& event);
void SetSelectedTab(int tab);
bool bRefreshList;
enum
{
ID_NOTEBOOK = 1000,
ID_GENERALPAGE,
ID_DISPLAYPAGE,
ID_AUDIOPAGE,
ID_GAMECUBEPAGE,
ID_WIIPAGE,
ID_PATHSPAGE,
};
private:
enum
{
ID_CPUTHREAD = 1010,
ID_IDLESKIP,
ID_ENABLECHEATS,
ID_FRAMELIMIT,
ID_CPUENGINE,
ID_DSPTHREAD,
ID_NTSCJ,
// Audio Settings
ID_DSPENGINE,
ID_ENABLE_HLE_AUDIO,
ID_ENABLE_THROTTLE,
ID_DUMP_AUDIO,
ID_DPL2DECODER,
ID_LATENCY,
ID_BACKEND,
ID_VOLUME,
// Interface settings
ID_INTERFACE_CONFIRMSTOP,
ID_INTERFACE_USEPANICHANDLERS,
ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
ID_INTERFACE_LANG,
ID_HOTKEY_CONFIG,
ID_GC_SRAM_LNG,
ID_GC_ALWAYS_HLE_BS2,
ID_GC_EXIDEVICE_SLOTA,
ID_GC_EXIDEVICE_SLOTA_PATH,
ID_GC_EXIDEVICE_SLOTB,
ID_GC_EXIDEVICE_SLOTB_PATH,
ID_GC_EXIDEVICE_SP1,
ID_GC_SIDEVICE0,
ID_GC_SIDEVICE1,
ID_GC_SIDEVICE2,
ID_GC_SIDEVICE3,
ID_WII_IPL_SSV,
ID_WII_IPL_E60,
ID_WII_IPL_AR,
ID_WII_IPL_LNG,
ID_WII_SD_CARD,
ID_WII_KEYBOARD,
ID_ISOPATHS,
ID_RECURSIVEISOPATH,
ID_ADDISOPATH,
ID_REMOVEISOPATH,
ID_DEFAULTISO,
ID_DVDROOT,
ID_APPLOADERPATH,
ID_NANDROOT,
ID_DSP_CB,
ID_DSP_CONFIG,
ID_DSP_ABOUT,
};
wxNotebook* Notebook;
wxPanel* PathsPage;
// Basic
wxCheckBox* CPUThread;
wxCheckBox* SkipIdle;
wxCheckBox* EnableCheats;
wxChoice* Framelimit;
// Advanced
wxRadioBox* CPUEngine;
wxCheckBox* DSPThread;
wxCheckBox* _NTSCJ;
wxBoxSizer* sDisplayPage; // Display settings
wxStaticBoxSizer* sbInterface; // Display and Interface sections
// Audio
wxBoxSizer* sAudioPage; // GC settings
wxRadioBox* DSPEngine;
wxSlider* VolumeSlider;
wxStaticText* VolumeText;
wxCheckBox* DumpAudio;
wxCheckBox* DPL2Decoder;
wxArrayString wxArrayBackends;
wxChoice* BackendSelection;
wxSpinCtrl* Latency;
// Interface
wxCheckBox* ConfirmStop;
wxCheckBox* UsePanicHandlers;
wxCheckBox* OnScreenDisplayMessages;
wxChoice* InterfaceLang;
wxButton* HotkeyConfig;
wxBoxSizer* sGamecubePage; // GC settings
wxStaticBoxSizer* sbGamecubeIPLSettings;
wxGridBagSizer* sGamecubeIPLSettings;
// IPL
wxChoice* GCSystemLang;
wxCheckBox* GCAlwaysHLE_BS2;
// Device
wxChoice* GCEXIDevice[3];
wxButton* GCMemcardPath[2];
wxChoice* GCSIDevice[4];
wxBoxSizer* sWiiPage; // Wii settings
wxStaticBoxSizer* /*sbWiimoteSettings, **/sbWiiIPLSettings, *sbWiiDeviceSettings; // Wiimote, Misc and Device sections
wxGridBagSizer* /*sWiimoteSettings, **/sWiiIPLSettings;
// Misc
wxCheckBox* WiiScreenSaver;
wxCheckBox* WiiEuRGB60;
wxChoice* WiiAspectRatio;
wxChoice* WiiSystemLang;
// Device
wxCheckBox* WiiSDCard;
wxCheckBox* WiiKeyboard;
wxBoxSizer* sPathsPage; // Paths settings
wxStaticBoxSizer* sbISOPaths;
wxGridBagSizer* sOtherPaths;
// ISO Directories
wxListBox* ISOPaths;
wxCheckBox* RecursiveISOPath;
wxButton* AddISOPath;
wxButton* RemoveISOPath;
// DefaultISO, DVD Root, Apploader, NANDPath
wxFilePickerCtrl* DefaultISO;
wxDirPickerCtrl* DVDRoot;
wxFilePickerCtrl* ApploaderPath;
wxDirPickerCtrl* NANDRoot;
// Graphics
wxChoice* GraphicSelection;
wxButton* GraphicConfig;
wxButton* m_Ok;
FILE* pStream;
wxArrayString arrayStringFor_Framelimit;
wxArrayString arrayStringFor_CPUEngine;
wxArrayString arrayStringFor_DSPEngine;
wxArrayString arrayStringFor_FullscreenResolution;
wxArrayString arrayStringFor_InterfaceLang;
wxArrayString arrayStringFor_GCSystemLang;
wxArrayString arrayStringFor_WiiSensBarPos;
wxArrayString arrayStringFor_WiiAspectRatio;
wxArrayString arrayStringFor_WiiSystemLang;
wxArrayString arrayStringFor_ISOPaths;
void InitializeGUILists();
void InitializeGUIValues();
void InitializeGUITooltips();
void CreateGUIControls();
void UpdateGUI();
void OnClose(wxCloseEvent& event);
void CoreSettingsChanged(wxCommandEvent& event);
void DisplaySettingsChanged(wxCommandEvent& event);
void OnSpin(wxSpinEvent& event);
void AudioSettingsChanged(wxCommandEvent& event);
void AddAudioBackends();
void GCSettingsChanged(wxCommandEvent& event);
void ChooseMemcardPath(std::string& strMemcard, bool isSlotA);
void ChooseSIDevice(wxString deviceName, int deviceNum);
void ChooseEXIDevice(wxString deviceName, int deviceNum);
void WiiSettingsChanged(wxCommandEvent& event);
// Change from IPL.LNG value to country code
inline u8 GetSADRCountryCode(int language);
void ISOPathsSelectionChanged(wxCommandEvent& event);
void RecursiveDirectoryChanged(wxCommandEvent& event);
void AddRemoveISOPaths(wxCommandEvent& event);
void DefaultISOChanged(wxFileDirPickerEvent& event);
void DVDRootChanged(wxFileDirPickerEvent& event);
void ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED (event));
void NANDRootChanged(wxFileDirPickerEvent& event);
private:
DECLARE_EVENT_TABLE();
static bool SupportsVolumeChanges(std::string backend);
};
|