2009-07-28 15:32:10 -06:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
// This program 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, version 2.0.
|
|
|
|
|
|
|
|
// This program 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 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_MAIN_h__
|
|
|
|
#define __CONFIG_MAIN_h__
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/gbsizer.h>
|
|
|
|
#include <wx/notebook.h>
|
|
|
|
#include <wx/filepicker.h>
|
2009-01-17 16:50:22 -07:00
|
|
|
#include "ConfigManager.h"
|
2010-04-21 22:28:34 -06:00
|
|
|
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
|
|
|
#include "X11Utils.h"
|
|
|
|
#endif
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
class CConfigMain : public wxDialog
|
2008-12-07 21:46:09 -07:00
|
|
|
{
|
2009-09-14 00:26:49 -06:00
|
|
|
public:
|
|
|
|
|
|
|
|
CConfigMain(wxWindow* parent,
|
|
|
|
wxWindowID id = 1,
|
|
|
|
const wxString& title = wxT("Dolphin Configuration"),
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE);
|
|
|
|
virtual ~CConfigMain();
|
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
void OnOk(wxCommandEvent& event);
|
2009-09-14 00:26:49 -06:00
|
|
|
void CloseClick(wxCommandEvent& event);
|
|
|
|
void OnSelectionChanged(wxCommandEvent& event);
|
|
|
|
void OnConfig(wxCommandEvent& event);
|
|
|
|
|
|
|
|
bool bRefreshList;
|
|
|
|
|
|
|
|
private:
|
2010-06-04 19:38:22 -06:00
|
|
|
wxNotebook* Notebook;
|
|
|
|
wxPanel* GeneralPage;
|
|
|
|
wxPanel* GamecubePage;
|
|
|
|
wxPanel* DisplayPage;
|
|
|
|
wxPanel* WiiPage;
|
|
|
|
wxPanel* PathsPage;
|
|
|
|
wxPanel* PluginsPage;
|
2009-09-14 00:26:49 -06:00
|
|
|
|
|
|
|
wxBoxSizer* sGeneralPage; // General Settings
|
2010-06-04 19:38:22 -06:00
|
|
|
wxStaticBoxSizer* sbBasic, *sbAdvanced; // Basic and Advanced sections
|
|
|
|
|
|
|
|
// Basic
|
|
|
|
wxCheckBox* CPUThread;
|
|
|
|
wxCheckBox* SkipIdle;
|
|
|
|
wxCheckBox* EnableCheats;
|
2009-09-14 00:26:49 -06:00
|
|
|
wxChoice* Framelimit;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxCheckBox* UseFPSForLimiting;
|
|
|
|
|
|
|
|
// Advanced
|
2009-10-11 10:16:18 -06:00
|
|
|
wxCheckBox* AlwaysHLE_BS2;
|
2010-06-22 07:17:01 -06:00
|
|
|
wxCheckBox* EnableOpenCL;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxRadioBox* CPUEngine;
|
2009-09-14 00:26:49 -06:00
|
|
|
wxCheckBox* DSPThread;
|
|
|
|
wxCheckBox* LockThreads;
|
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
wxBoxSizer* sDisplayPage; // Display settings
|
|
|
|
wxStaticBoxSizer* sbDisplay, *sbInterface; // Display and Interface sections
|
|
|
|
|
|
|
|
// Display
|
2010-05-30 02:22:04 -06:00
|
|
|
wxChoice* FullscreenResolution;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxSpinCtrl* WindowWidth, *WindowHeight;
|
|
|
|
wxCheckBox* Fullscreen;
|
|
|
|
wxCheckBox* HideCursor;
|
2010-05-30 02:22:04 -06:00
|
|
|
wxCheckBox* RenderToMain;
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
// Interface
|
|
|
|
wxCheckBox* ConfirmStop;
|
|
|
|
wxCheckBox* UsePanicHandlers;
|
|
|
|
wxRadioBox* Theme;
|
|
|
|
wxChoice* InterfaceLang;
|
2010-05-30 02:22:04 -06:00
|
|
|
wxButton* HotkeyConfig;
|
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
wxBoxSizer* sGamecubePage; // GC settings
|
2009-09-14 00:26:49 -06:00
|
|
|
wxStaticBoxSizer* sbGamecubeIPLSettings;
|
|
|
|
wxGridBagSizer* sGamecubeIPLSettings;
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
// IPL
|
2009-09-14 00:26:49 -06:00
|
|
|
wxChoice* GCSystemLang;
|
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
// 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;
|
2009-09-14 00:26:49 -06:00
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
// Wiimote
|
2009-09-14 00:26:49 -06:00
|
|
|
wxChoice* WiiSensBarPos;
|
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
// Misc
|
|
|
|
wxCheckBox* WiiScreenSaver;
|
2009-09-14 00:26:49 -06:00
|
|
|
wxCheckBox* WiiProgressiveScan;
|
|
|
|
wxCheckBox* WiiEuRGB60;
|
|
|
|
wxChoice* WiiAspectRatio;
|
|
|
|
wxChoice* WiiSystemLang;
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
// Device
|
2010-01-11 04:56:17 -07:00
|
|
|
wxCheckBox* WiiSDCard;
|
|
|
|
wxCheckBox* WiiKeyboard;
|
2009-09-14 00:26:49 -06:00
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
wxBoxSizer* sPathsPage; // Paths settings
|
|
|
|
wxStaticBoxSizer* sbISOPaths;
|
|
|
|
wxGridBagSizer* sOtherPaths;
|
|
|
|
|
|
|
|
// ISO Directories
|
2009-09-14 00:26:49 -06:00
|
|
|
wxListBox* ISOPaths;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxCheckBox* RecursiveISOPath;
|
2009-09-14 00:26:49 -06:00
|
|
|
wxButton* AddISOPath;
|
|
|
|
wxButton* RemoveISOPath;
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
// DefaultISO, DVD Root, Apploader
|
2009-09-14 00:26:49 -06:00
|
|
|
wxFilePickerCtrl* DefaultISO;
|
|
|
|
wxDirPickerCtrl* DVDRoot;
|
2009-12-10 02:16:10 -07:00
|
|
|
wxFilePickerCtrl* ApploaderPath;
|
2009-09-14 00:26:49 -06:00
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
wxBoxSizer* sPluginsPage; // Plugins settings
|
2010-06-13 03:14:40 -06:00
|
|
|
wxStaticBoxSizer* sbGraphicsPlugin, *sbDSPPlugin, *sbWiimotePlugin; // Graphics, DSP, Wiimote sections
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
// Graphics
|
2009-09-14 00:26:49 -06:00
|
|
|
wxChoice* GraphicSelection;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxButton* GraphicConfig;
|
|
|
|
|
|
|
|
// DSP
|
|
|
|
wxChoice* DSPSelection;
|
|
|
|
wxButton* DSPConfig;
|
|
|
|
|
|
|
|
// Wiimote
|
2009-09-14 00:26:49 -06:00
|
|
|
wxChoice* WiimoteSelection;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxButton* WiimoteConfig;
|
|
|
|
|
|
|
|
wxButton* m_Ok;
|
|
|
|
|
|
|
|
FILE* pStream;
|
2009-09-14 00:26:49 -06:00
|
|
|
|
2010-02-06 09:20:54 -07:00
|
|
|
wxArrayString arrayStringFor_Framelimit;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxArrayString arrayStringFor_CPUEngine;
|
2010-06-05 15:48:38 -06:00
|
|
|
wxArrayString arrayStringFor_FullscreenResolution;
|
2010-06-04 19:38:22 -06:00
|
|
|
wxArrayString arrayStringFor_Themes;
|
|
|
|
wxArrayString arrayStringFor_InterfaceLang;
|
2010-02-06 09:20:54 -07:00
|
|
|
wxArrayString arrayStringFor_GCSystemLang;
|
|
|
|
wxArrayString arrayStringFor_WiiSensBarPos;
|
|
|
|
wxArrayString arrayStringFor_WiiAspectRatio;
|
|
|
|
wxArrayString arrayStringFor_WiiSystemLang;
|
|
|
|
wxArrayString arrayStringFor_ISOPaths;
|
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
ID_NOTEBOOK = 1000,
|
|
|
|
ID_GENERALPAGE,
|
2010-05-30 02:22:04 -06:00
|
|
|
ID_DISPLAYPAGE,
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_GAMECUBEPAGE,
|
|
|
|
ID_WIIPAGE,
|
|
|
|
ID_PATHSPAGE,
|
|
|
|
ID_PLUGINPAGE,
|
|
|
|
|
2009-10-23 09:26:35 -06:00
|
|
|
ID_CPUTHREAD,
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_IDLESKIP,
|
|
|
|
ID_ENABLECHEATS,
|
2010-06-04 19:38:22 -06:00
|
|
|
ID_FRAMELIMIT_TEXT, ID_FRAMELIMIT,
|
|
|
|
ID_FRAMELIMIT_USEFPSFORLIMITING,
|
|
|
|
|
|
|
|
ID_ALWAYS_HLE_BS2,
|
2010-06-22 07:17:01 -06:00
|
|
|
ID_ENABLE_OPENCL,
|
2010-06-04 19:38:22 -06:00
|
|
|
ID_CPUENGINE,
|
|
|
|
ID_LOCKTHREADS,
|
|
|
|
ID_DSPTHREAD,
|
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
|
2010-04-21 22:28:34 -06:00
|
|
|
ID_DISPLAY_FULLSCREENRES,
|
|
|
|
ID_DISPLAY_WINDOWWIDTH,
|
|
|
|
ID_DISPLAY_WINDOWHEIGHT,
|
2010-04-11 19:33:10 -06:00
|
|
|
ID_DISPLAY_FULLSCREEN,
|
|
|
|
ID_DISPLAY_HIDECURSOR,
|
|
|
|
ID_DISPLAY_RENDERTOMAIN,
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
// Interface settings
|
|
|
|
ID_INTERFACE_CONFIRMSTOP,
|
|
|
|
ID_INTERFACE_USEPANICHANDLERS,
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_INTERFACE_THEME,
|
2010-06-04 19:38:22 -06:00
|
|
|
ID_INTERFACE_LANG_TEXT, ID_INTERFACE_LANG,
|
|
|
|
ID_HOTKEY_CONFIG,
|
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
|
|
|
|
ID_GC_SRAM_LNG_TEXT,
|
|
|
|
ID_GC_SRAM_LNG,
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_GC_EXIDEVICE_SLOTA_TEXT,
|
|
|
|
ID_GC_EXIDEVICE_SLOTA,
|
|
|
|
ID_GC_EXIDEVICE_SLOTA_PATH,
|
|
|
|
ID_GC_EXIDEVICE_SLOTB_TEXT,
|
|
|
|
ID_GC_EXIDEVICE_SLOTB,
|
|
|
|
ID_GC_EXIDEVICE_SLOTB_PATH,
|
|
|
|
ID_GC_EXIDEVICE_SP1_TEXT,
|
|
|
|
ID_GC_EXIDEVICE_SP1,
|
|
|
|
ID_GC_SIDEVICE_TEXT,
|
|
|
|
ID_GC_SIDEVICE0,
|
|
|
|
ID_GC_SIDEVICE1,
|
|
|
|
ID_GC_SIDEVICE2,
|
|
|
|
ID_GC_SIDEVICE3,
|
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_WII_BT_BAR_TEXT,
|
|
|
|
ID_WII_BT_BAR,
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_WII_IPL_SSV,
|
|
|
|
ID_WII_IPL_PGS,
|
|
|
|
ID_WII_IPL_E60,
|
|
|
|
ID_WII_IPL_AR_TEXT,
|
|
|
|
ID_WII_IPL_AR,
|
|
|
|
ID_WII_IPL_LNG_TEXT,
|
|
|
|
ID_WII_IPL_LNG,
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2010-01-11 04:56:17 -07:00
|
|
|
ID_WII_SD_CARD,
|
|
|
|
ID_WII_KEYBOARD,
|
2009-09-14 00:26:49 -06:00
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_ISOPATHS,
|
2010-06-04 19:38:22 -06:00
|
|
|
ID_RECURSIVEISOPATH,
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_ADDISOPATH,
|
|
|
|
ID_REMOVEISOPATH,
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_DEFAULTISO_TEXT,
|
|
|
|
ID_DEFAULTISO,
|
|
|
|
ID_DVDROOT_TEXT,
|
|
|
|
ID_DVDROOT,
|
2009-12-10 02:16:10 -07:00
|
|
|
ID_APPLOADERPATH_TEXT,
|
|
|
|
ID_APPLOADERPATH,
|
2009-09-14 00:26:49 -06:00
|
|
|
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
ID_GRAPHIC_TEXT,
|
|
|
|
ID_GRAPHIC_CB,
|
|
|
|
ID_GRAPHIC_CONFIG,
|
|
|
|
ID_GRAPHIC_ABOUT,
|
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
ID_DSP_TEXT,
|
|
|
|
ID_DSP_CB,
|
2010-06-04 19:38:22 -06:00
|
|
|
ID_DSP_CONFIG,
|
|
|
|
ID_DSP_ABOUT,
|
|
|
|
|
|
|
|
ID_WIIMOTE_TEXT,
|
|
|
|
ID_WIIMOTE_CB,
|
|
|
|
ID_WIIMOTE_CONFIG,
|
|
|
|
ID_WIIMOTE_ABOUT
|
2009-09-14 00:26:49 -06:00
|
|
|
};
|
|
|
|
|
2010-02-06 09:20:54 -07:00
|
|
|
void InitializeGUILists();
|
|
|
|
void InitializeGUIValues();
|
|
|
|
void InitializeGUITooltips();
|
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
void CreateGUIControls();
|
|
|
|
void UpdateGUI();
|
|
|
|
void OnClose(wxCloseEvent& event);
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
void CoreSettingsChanged(wxCommandEvent& event);
|
2010-06-04 19:38:22 -06:00
|
|
|
|
|
|
|
void DisplaySettingsChanged(wxCommandEvent& event);
|
|
|
|
void AddResolutions();
|
|
|
|
void OnSpin(wxSpinEvent& event);
|
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
void GCSettingsChanged(wxCommandEvent& event);
|
|
|
|
void ChooseMemcardPath(std::string& strMemcard, bool isSlotA);
|
|
|
|
void ChooseSIDevice(std::string deviceName, int deviceNum);
|
|
|
|
void ChooseEXIDevice(std::string deviceName, int deviceNum);
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
void WiiSettingsChanged(wxCommandEvent& event);
|
2010-06-04 19:38:22 -06:00
|
|
|
|
2009-09-14 00:26:49 -06:00
|
|
|
void ISOPathsSelectionChanged(wxCommandEvent& event);
|
|
|
|
void RecursiveDirectoryChanged(wxCommandEvent& event);
|
|
|
|
void AddRemoveISOPaths(wxCommandEvent& event);
|
|
|
|
void DefaultISOChanged(wxFileDirPickerEvent& event);
|
|
|
|
void DVDRootChanged(wxFileDirPickerEvent& event);
|
2009-12-10 02:16:10 -07:00
|
|
|
void ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED (event));
|
2009-09-14 00:26:49 -06:00
|
|
|
|
|
|
|
void FillChoiceBox(wxChoice* _pChoice, int _PluginType, const std::string& _SelectFilename);
|
|
|
|
void CallConfig(wxChoice* _pChoice);
|
|
|
|
bool GetFilename(wxChoice* _pChoice, std::string& _rFilename);
|
2010-06-04 19:38:22 -06:00
|
|
|
DECLARE_EVENT_TABLE();
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|
|
|
|
#endif
|