2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:43:35 -06:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <cstddef>
|
2015-08-08 11:59:33 -06:00
|
|
|
#include <functional>
|
2015-08-15 16:04:30 -06:00
|
|
|
#include <memory>
|
2014-02-19 20:11:52 -07:00
|
|
|
#include <set>
|
2014-02-17 03:18:15 -07:00
|
|
|
#include <string>
|
2015-08-15 16:04:30 -06:00
|
|
|
#include <utility>
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <vector>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/treebase.h>
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "Common/IniFile.h"
|
2015-09-13 06:17:58 -06:00
|
|
|
#include "DolphinWX/ISOFile.h"
|
2015-02-24 16:32:17 -07:00
|
|
|
#include "DolphinWX/PatchAddEdit.h"
|
2014-02-22 15:36:30 -07:00
|
|
|
|
2016-12-04 00:04:35 -07:00
|
|
|
class ActionReplayCodesPanel;
|
|
|
|
class CheatWarningMessage;
|
2016-08-03 05:14:52 -06:00
|
|
|
class DolphinSlider;
|
2014-02-22 15:36:30 -07:00
|
|
|
class wxButton;
|
|
|
|
class wxCheckBox;
|
|
|
|
class wxCheckListBox;
|
|
|
|
class wxChoice;
|
2015-01-02 10:49:10 -07:00
|
|
|
class wxSpinCtrl;
|
2014-02-22 15:36:30 -07:00
|
|
|
class wxStaticBitmap;
|
|
|
|
class wxTextCtrl;
|
2015-04-28 15:31:13 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
namespace DiscIO
|
|
|
|
{
|
2017-06-06 03:49:01 -06:00
|
|
|
class Volume;
|
2016-06-24 02:43:46 -06:00
|
|
|
}
|
2016-12-04 00:04:35 -07:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
namespace Gecko
|
|
|
|
{
|
|
|
|
class CodeConfigPanel;
|
|
|
|
}
|
2015-02-24 16:32:17 -07:00
|
|
|
|
2011-02-03 10:51:12 -07:00
|
|
|
struct PHackData
|
|
|
|
{
|
2016-06-24 02:43:46 -06:00
|
|
|
bool PHackSZNear;
|
|
|
|
bool PHackSZFar;
|
|
|
|
std::string PHZNear;
|
|
|
|
std::string PHZFar;
|
2011-02-03 10:51:12 -07:00
|
|
|
};
|
|
|
|
|
2016-11-12 18:51:08 -07:00
|
|
|
wxDECLARE_EVENT(DOLPHIN_EVT_CHANGE_ISO_PROPERTIES_TITLE, wxCommandEvent);
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
class CISOProperties : public wxDialog
|
|
|
|
{
|
2011-03-16 16:22:21 -06:00
|
|
|
public:
|
2016-06-24 02:43:46 -06:00
|
|
|
CISOProperties(const GameListItem& game_list_item, wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
|
|
const wxString& title = _("Properties"), const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
|
|
|
virtual ~CISOProperties();
|
2011-03-16 16:22:21 -06:00
|
|
|
|
|
|
|
private:
|
2017-07-30 13:56:12 -06:00
|
|
|
DECLARE_EVENT_TABLE()
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-06-06 03:49:01 -06:00
|
|
|
std::unique_ptr<DiscIO::Volume> m_open_iso;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-09-20 16:37:25 -06:00
|
|
|
std::vector<PatchEngine::Patch> m_on_frame;
|
|
|
|
PHackData m_phack_data;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
// Core
|
2017-09-20 16:37:25 -06:00
|
|
|
wxCheckBox *m_cpu_thread, *m_mmu, *m_dcbz_off, *m_fprf;
|
|
|
|
wxCheckBox *m_sync_gpu, *m_fast_disc_speed, *m_dps_hle;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-09-20 16:37:25 -06:00
|
|
|
wxArrayString m_gpu_determinism_string;
|
|
|
|
wxChoice* m_gpu_determinism;
|
2016-06-24 02:43:46 -06:00
|
|
|
// Wii
|
2017-09-20 16:37:25 -06:00
|
|
|
wxCheckBox* m_enable_widescreen;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
// Stereoscopy
|
2017-09-20 16:37:25 -06:00
|
|
|
DolphinSlider* m_depth_percentage;
|
|
|
|
wxSpinCtrl* m_convergence;
|
|
|
|
wxCheckBox* m_mono_depth;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-09-20 16:37:25 -06:00
|
|
|
wxArrayString m_emustate_string;
|
|
|
|
wxChoice* m_emustate_choice;
|
|
|
|
wxTextCtrl* m_emu_issues;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-09-20 16:37:25 -06:00
|
|
|
wxCheckListBox* m_patches;
|
|
|
|
wxButton* m_edit_patch;
|
|
|
|
wxButton* m_remove_patch;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2016-07-22 19:05:04 -06:00
|
|
|
ActionReplayCodesPanel* m_ar_code_panel;
|
2016-06-24 02:43:46 -06:00
|
|
|
Gecko::CodeConfigPanel* m_geckocode_panel;
|
|
|
|
|
2016-07-22 19:05:22 -06:00
|
|
|
CheatWarningMessage* m_cheats_disabled_ar;
|
|
|
|
CheatWarningMessage* m_cheats_disabled_gecko;
|
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
enum
|
|
|
|
{
|
2016-12-04 00:04:35 -07:00
|
|
|
ID_NOTEBOOK = 1000,
|
2016-06-24 02:43:46 -06:00
|
|
|
ID_GAMECONFIG,
|
|
|
|
ID_PATCH_PAGE,
|
|
|
|
ID_ARCODE_PAGE,
|
|
|
|
ID_SPEEDHACK_PAGE,
|
|
|
|
ID_INFORMATION,
|
|
|
|
ID_FILESYSTEM,
|
|
|
|
|
|
|
|
ID_USEDUALCORE,
|
|
|
|
ID_MMU,
|
|
|
|
ID_DCBZOFF,
|
|
|
|
ID_FPRF,
|
|
|
|
ID_SYNCGPU,
|
|
|
|
ID_DISCSPEED,
|
|
|
|
ID_AUDIO_DSP_HLE,
|
|
|
|
ID_USE_BBOX,
|
|
|
|
ID_ENABLEPROGRESSIVESCAN,
|
|
|
|
ID_ENABLEWIDESCREEN,
|
|
|
|
ID_EDITCONFIG,
|
|
|
|
ID_SHOWDEFAULTCONFIG,
|
|
|
|
ID_EMUSTATE,
|
|
|
|
ID_EMU_ISSUES,
|
|
|
|
ID_PATCHES_LIST,
|
|
|
|
ID_EDITPATCH,
|
|
|
|
ID_ADDPATCH,
|
|
|
|
ID_REMOVEPATCH,
|
|
|
|
ID_GPUDETERMINISM,
|
|
|
|
ID_DEPTHPERCENTAGE,
|
|
|
|
ID_CONVERGENCE,
|
|
|
|
ID_MONODEPTH,
|
|
|
|
};
|
|
|
|
|
|
|
|
void LaunchExternalEditor(const std::string& filename, bool wait_until_closed);
|
|
|
|
|
|
|
|
void CreateGUIControls();
|
|
|
|
void OnClose(wxCloseEvent& event);
|
|
|
|
void OnCloseClick(wxCommandEvent& event);
|
|
|
|
void OnEditConfig(wxCommandEvent& event);
|
|
|
|
void OnShowDefaultConfig(wxCommandEvent& event);
|
2016-07-22 19:05:04 -06:00
|
|
|
void PatchListSelectionChanged(wxCommandEvent& event);
|
2016-06-24 02:43:46 -06:00
|
|
|
void PatchButtonClicked(wxCommandEvent& event);
|
|
|
|
void OnEmustateChanged(wxCommandEvent& event);
|
2016-07-22 19:05:22 -06:00
|
|
|
void OnCheatCodeToggled(wxCommandEvent& event);
|
2016-11-12 18:51:08 -07:00
|
|
|
void OnChangeTitle(wxCommandEvent& event);
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-09-20 16:37:25 -06:00
|
|
|
const GameListItem m_open_gamelist_item;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-09-20 16:37:25 -06:00
|
|
|
IniFile m_gameini_default;
|
|
|
|
IniFile m_gameini_local;
|
|
|
|
std::string m_gameini_file_local;
|
|
|
|
std::string m_game_id;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
2017-09-20 16:37:25 -06:00
|
|
|
std::set<std::string> m_default_patches;
|
2016-06-24 02:43:46 -06:00
|
|
|
|
|
|
|
void LoadGameConfig();
|
|
|
|
bool SaveGameConfig();
|
|
|
|
void OnLocalIniModified(wxCommandEvent& ev);
|
|
|
|
void GenerateLocalIniModified();
|
|
|
|
void PatchList_Load();
|
|
|
|
void PatchList_Save();
|
|
|
|
|
|
|
|
long GetElementStyle(const char* section, const char* key);
|
|
|
|
void SetCheckboxValueFromGameini(const char* section, const char* key, wxCheckBox* checkbox);
|
|
|
|
void SaveGameIniValueFrom3StateCheckbox(const char* section, const char* key,
|
|
|
|
wxCheckBox* checkbox);
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|