Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GPUDeterminismMode to isoproperties. #1515

Merged
merged 1 commit into from Nov 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 36 additions & 0 deletions Source/Core/DolphinWX/ISOProperties.cpp
Expand Up @@ -404,6 +404,16 @@ void CISOProperties::CreateGUIControls(bool IsWad)
BlockMerging = new wxCheckBox(m_GameConfig, ID_MERGEBLOCKS, _("Enable Block Merging"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "BlockMerging"));
DSPHLE = new wxCheckBox(m_GameConfig, ID_AUDIO_DSP_HLE, _("DSP HLE emulation (fast)"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "DSPHLE"));

wxBoxSizer* const sGPUDeterminism = new wxBoxSizer(wxHORIZONTAL);
wxStaticText* const GPUDeterminismText = new wxStaticText(m_GameConfig, wxID_ANY, _("Deterministic dual core: "));
arrayStringFor_GPUDeterminism.Add(_("Not Set"));
arrayStringFor_GPUDeterminism.Add(_("auto"));

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

arrayStringFor_GPUDeterminism.Add(_("none"));
arrayStringFor_GPUDeterminism.Add(_("fake-completion"));
GPUDeterminism = new wxChoice(m_GameConfig, ID_EMUSTATE, wxDefaultPosition, wxDefaultSize, arrayStringFor_GPUDeterminism);
sGPUDeterminism->Add(GPUDeterminismText);
sGPUDeterminism->Add(GPUDeterminism);

// Wii Console
EnableWideScreen = new wxCheckBox(m_GameConfig, ID_ENABLEWIDESCREEN, _("Enable WideScreen"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Wii", "Widescreen"));

Expand Down Expand Up @@ -432,6 +442,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5);
sbCoreOverrides->Add(BlockMerging, 0, wxLEFT, 5);
sbCoreOverrides->Add(DSPHLE, 0, wxLEFT, 5);
sbCoreOverrides->Add(sGPUDeterminism, 0, wxEXPAND|wxALL, 5);

wxStaticBoxSizer * const sbWiiOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Wii Console"));
if (!DiscIO::IsVolumeWiiDisc(OpenISO) && !DiscIO::IsVolumeWadFile(OpenISO))
Expand Down Expand Up @@ -1051,6 +1062,19 @@ void CISOProperties::LoadGameConfig()

EmuIssues->Enable(EmuState->GetSelection() != 0);

sTemp = "";
if (!GameIniLocal.GetIfExists("Core", "GPUDeterminismMode", &sTemp))
GameIniDefault.GetIfExists("Core", "GPUDeterminismMode", &sTemp);

if (sTemp == "")

This comment was marked as off-topic.

This comment was marked as off-topic.

GPUDeterminism->SetSelection(0);
else if (sTemp == "auto")
GPUDeterminism->SetSelection(1);
else if (sTemp == "none")
GPUDeterminism->SetSelection(2);
else if (sTemp == "fake-completion")
GPUDeterminism->SetSelection(3);

PatchList_Load();
ActionReplayList_Load();
m_geckocode_panel->LoadCodes(GameIniDefault, GameIniLocal, OpenISO->GetUniqueID());
Expand Down Expand Up @@ -1116,6 +1140,18 @@ bool CISOProperties::SaveGameConfig()
std::string emu_issues = EmuIssues->GetValue().ToStdString();
SAVE_IF_NOT_DEFAULT("EmuState", "EmulationIssues", emu_issues, "");

std::string tmp;
if (GPUDeterminism->GetSelection() == 0)
tmp = "Not Set";
else if (GPUDeterminism->GetSelection() == 1)
tmp = "auto";
else if (GPUDeterminism->GetSelection() == 2)
tmp = "none";
else if (GPUDeterminism->GetSelection() == 3)
tmp = "fake-completion";

SAVE_IF_NOT_DEFAULT("Core", "GPUDeterminismMode", tmp, "Not Set");

PatchList_Save();
ActionReplayList_Save();
Gecko::SaveCodes(GameIniLocal, m_geckocode_panel->GetCodes());
Expand Down
69 changes: 36 additions & 33 deletions Source/Core/DolphinWX/ISOProperties.h
Expand Up @@ -69,46 +69,49 @@ class CISOProperties : public wxDialog
// Core
wxCheckBox *CPUThread, *SkipIdle, *MMU, *BAT, *DCBZOFF, *FPRF;
wxCheckBox *VBeam, *SyncGPU, *FastDiscSpeed, *BlockMerging, *DSPHLE;

wxArrayString arrayStringFor_GPUDeterminism;
wxChoice* GPUDeterminism;
// Wii
wxCheckBox *EnableWideScreen;
wxCheckBox* EnableWideScreen;

wxArrayString arrayStringFor_EmuState;
wxChoice *EmuState;
wxTextCtrl *EmuIssues;
wxChoice* EmuState;
wxTextCtrl* EmuIssues;
wxArrayString arrayStringFor_Patches;
wxCheckListBox *Patches;
wxButton *EditPatch;
wxButton *RemovePatch;
wxCheckListBox* Patches;
wxButton* EditPatch;
wxButton* RemovePatch;
wxArrayString arrayStringFor_Cheats;
wxCheckListBox *Cheats;
wxButton *EditCheat;
wxButton *RemoveCheat;
wxCheckListBox* Cheats;
wxButton* EditCheat;
wxButton* RemoveCheat;
wxArrayString arrayStringFor_Speedhacks;
wxCheckListBox *Speedhacks;
wxButton *EditSpeedhack;
wxButton *AddSpeedhack;
wxButton *RemoveSpeedhack;

wxTextCtrl *m_Name;
wxTextCtrl *m_GameID;
wxTextCtrl *m_Country;
wxTextCtrl *m_MakerID;
wxTextCtrl *m_Revision;
wxTextCtrl *m_Date;
wxTextCtrl *m_FST;
wxTextCtrl *m_MD5Sum;
wxButton *m_MD5SumCompute;
wxCheckListBox* Speedhacks;
wxButton* EditSpeedhack;
wxButton* AddSpeedhack;
wxButton* RemoveSpeedhack;

wxTextCtrl* m_Name;
wxTextCtrl* m_GameID;
wxTextCtrl* m_Country;
wxTextCtrl* m_MakerID;
wxTextCtrl* m_Revision;
wxTextCtrl* m_Date;
wxTextCtrl* m_FST;
wxTextCtrl* m_MD5Sum;
wxButton* m_MD5SumCompute;
wxArrayString arrayStringFor_Lang;
wxChoice *m_Lang;
wxTextCtrl *m_ShortName;
wxTextCtrl *m_Maker;
wxTextCtrl *m_Comment;
wxStaticBitmap *m_Banner;
wxChoice* m_Lang;
wxTextCtrl* m_ShortName;
wxTextCtrl* m_Maker;
wxTextCtrl* m_Comment;
wxStaticBitmap* m_Banner;

wxTreeCtrl *m_Treectrl;
wxTreeCtrl* m_Treectrl;
wxTreeItemId RootId;

Gecko::CodeConfigPanel *m_geckocode_panel;
Gecko::CodeConfigPanel* m_geckocode_panel;

enum
{
Expand Down Expand Up @@ -193,10 +196,10 @@ class CISOProperties : public wxDialog
void SetRefresh(wxCommandEvent& event);
void OnChangeBannerLang(wxCommandEvent& event);

GameListItem *OpenGameListItem;
GameListItem* OpenGameListItem;

std::vector<const DiscIO::SFileInfo *> GCFiles;
typedef std::vector<const DiscIO::SFileInfo *>::iterator fileIter;
std::vector<const DiscIO::SFileInfo*> GCFiles;
typedef std::vector<const DiscIO::SFileInfo*>::iterator fileIter;

size_t CreateDirectoryTree(wxTreeItemId& parent,
std::vector<const DiscIO::SFileInfo*> fileInfos,
Expand Down