Skip to content

Commit

Permalink
Merge pull request dolphin-emu#704 from lioncash/pjhack-removal
Browse files Browse the repository at this point in the history
DolphinWX: Remove the Projection Hack UI
  • Loading branch information
delroth committed Aug 1, 2014
2 parents 842f888 + cd37af8 commit f6995d1
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 254 deletions.
1 change: 0 additions & 1 deletion Source/Core/DolphinWX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ if(wxWidgets_FOUND)
MemcardManager.cpp
MemoryCards/WiiSaveCrypted.cpp
NetWindow.cpp
PHackSettings.cpp
PatchAddEdit.cpp
TASInputDlg.cpp
VideoConfigDiag.cpp
Expand Down
6 changes: 2 additions & 4 deletions Source/Core/DolphinWX/DolphinWX.vcxproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
Expand Down Expand Up @@ -90,7 +90,6 @@
<ClCompile Include="MemoryCards\WiiSaveCrypted.cpp" />
<ClCompile Include="NetWindow.cpp" />
<ClCompile Include="PatchAddEdit.cpp" />
<ClCompile Include="PHackSettings.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
Expand Down Expand Up @@ -140,7 +139,6 @@
<ClInclude Include="MemoryCards\WiiSaveCrypted.h" />
<ClInclude Include="NetWindow.h" />
<ClInclude Include="PatchAddEdit.h" />
<ClInclude Include="PHackSettings.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="TASInputDlg.h" />
<ClInclude Include="VideoConfigDiag.h" />
Expand Down Expand Up @@ -228,4 +226,4 @@
<Message Text="Copy: @(BinaryFiles) -&gt; $(BinaryOutputDir)" Importance="High" />
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(BinaryOutputDir)" />
</Target>
</Project>
</Project>
10 changes: 2 additions & 8 deletions Source/Core/DolphinWX/DolphinWX.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="GUI">
Expand Down Expand Up @@ -146,9 +146,6 @@
<ClCompile Include="PatchAddEdit.cpp">
<Filter>GUI</Filter>
</ClCompile>
<ClCompile Include="PHackSettings.cpp">
<Filter>GUI</Filter>
</ClCompile>
<ClCompile Include="TASInputDlg.cpp">
<Filter>GUI</Filter>
</ClCompile>
Expand Down Expand Up @@ -271,9 +268,6 @@
<ClInclude Include="PatchAddEdit.h">
<Filter>GUI</Filter>
</ClInclude>
<ClInclude Include="PHackSettings.h">
<Filter>GUI</Filter>
</ClInclude>
<ClInclude Include="TASInputDlg.h">
<Filter>GUI</Filter>
</ClInclude>
Expand All @@ -296,4 +290,4 @@
<Filter>Resources</Filter>
</Image>
</ItemGroup>
</Project>
</Project>
28 changes: 0 additions & 28 deletions Source/Core/DolphinWX/ISOProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
#include "DolphinWX/ISOFile.h"
#include "DolphinWX/ISOProperties.h"
#include "DolphinWX/PatchAddEdit.h"
#include "DolphinWX/PHackSettings.h"
#include "DolphinWX/WxUtils.h"
#include "DolphinWX/resources/isoprop_disc.xpm"
#include "DolphinWX/resources/isoprop_file.xpm"
Expand Down Expand Up @@ -105,7 +104,6 @@ BEGIN_EVENT_TABLE(CISOProperties, wxDialog)
EVT_BUTTON(ID_SHOWDEFAULTCONFIG, CISOProperties::OnShowDefaultConfig)
EVT_CHOICE(ID_EMUSTATE, CISOProperties::SetRefresh)
EVT_CHOICE(ID_EMU_ISSUES, CISOProperties::SetRefresh)
EVT_BUTTON(ID_PHSETTINGS, CISOProperties::PHackButtonClicked)
EVT_LISTBOX(ID_PATCHES_LIST, CISOProperties::ListSelectionChanged)
EVT_BUTTON(ID_EDITPATCH, CISOProperties::PatchButtonClicked)
EVT_BUTTON(ID_ADDPATCH, CISOProperties::PatchButtonClicked)
Expand Down Expand Up @@ -413,13 +411,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
UseBBox = new wxCheckBox(m_GameConfig, ID_USE_BBOX, _("Enable Bounding Box Calculation"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Video", "UseBBox"));
UseBBox->SetToolTip(_("If checked, the bounding box registers will be updated. Used by the Paper Mario games."));

// Hack
wxFlexGridSizer* const szrPHackSettings = new wxFlexGridSizer(0);
PHackEnable = new wxCheckBox(m_GameConfig, ID_PHACKENABLE, _("Custom Projection Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
PHackEnable->SetToolTip(_("Enables Custom Projection Hack"));
PHSettings = new wxButton(m_GameConfig, ID_PHSETTINGS, _("Settings..."));
PHSettings->SetToolTip(_("Customize some Orthographic Projection parameters."));

wxBoxSizer* const sEmuState = new wxBoxSizer(wxHORIZONTAL);
wxStaticText* const EmuStateText = new wxStaticText(m_GameConfig, wxID_ANY, _("Emulation State: "));
arrayStringFor_EmuState.Add(_("Not Set"));
Expand Down Expand Up @@ -455,10 +446,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)

wxStaticBoxSizer * const sbVideoOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Video"));
sbVideoOverrides->Add(UseBBox, 0, wxLEFT, 5);
szrPHackSettings->Add(PHackEnable, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
szrPHackSettings->Add(PHSettings, 0, wxLEFT, 5);

sbVideoOverrides->Add(szrPHackSettings, 0, wxEXPAND);
wxStaticBoxSizer * const sbGameConfig = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Game-Specific Settings"));
sbGameConfig->Add(OverrideText, 0, wxEXPAND|wxALL, 5);
sbGameConfig->Add(sbCoreOverrides, 0, wxEXPAND);
Expand Down Expand Up @@ -1043,10 +1031,6 @@ void CISOProperties::LoadGameConfig()
// First set values from default gameini, then apply values from local gameini
int iTemp;
default_video->Get("ProjectionHack", &iTemp);
PHackEnable->SetValue(!!iTemp);
if (local_video->Get("ProjectionHack", &iTemp))
PHackEnable->SetValue(!!iTemp);

default_video->Get("PH_SZNear", &PHack_Data.PHackSZNear);
if (GameIniLocal.GetIfExists("Video", "PH_SZNear", &iTemp))
PHack_Data.PHackSZNear = !!iTemp;
Expand Down Expand Up @@ -1133,7 +1117,6 @@ bool CISOProperties::SaveGameConfig()
GameIniLocal.DeleteKey((section), (key)); \
} while (0)

SAVE_IF_NOT_DEFAULT("Video", "ProjectionHack", (int)PHackEnable->GetValue(), 0);
SAVE_IF_NOT_DEFAULT("Video", "PH_SZNear", (PHack_Data.PHackSZNear ? 1 : 0), 0);
SAVE_IF_NOT_DEFAULT("Video", "PH_SZFar", (PHack_Data.PHackSZFar ? 1 : 0), 0);
SAVE_IF_NOT_DEFAULT("Video", "PH_ZNear", PHack_Data.PHZNear, "");
Expand Down Expand Up @@ -1329,17 +1312,6 @@ void CISOProperties::PatchList_Save()
GameIniLocal.SetLines("OnFrame", lines);
}

void CISOProperties::PHackButtonClicked(wxCommandEvent& event)
{
if (event.GetId() == ID_PHSETTINGS)
{
::PHack_Data = PHack_Data;
CPHackSettings dlg(this, 1);
if (dlg.ShowModal() == wxID_OK)
PHack_Data = ::PHack_Data;
}
}

void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
{
int selection = Patches->GetSelection();
Expand Down
6 changes: 1 addition & 5 deletions Source/Core/DolphinWX/ISOProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ class CISOProperties : public wxDialog
// Wii
wxCheckBox *EnableWideScreen;
// Video
wxCheckBox *PHackEnable, *UseBBox;
wxButton *PHSettings;
wxCheckBox *UseBBox;

wxArrayString arrayStringFor_EmuState;
wxChoice *EmuState;
Expand Down Expand Up @@ -136,8 +135,6 @@ class CISOProperties : public wxDialog
ID_MERGEBLOCKS,
ID_AUDIO_DSP_HLE,
ID_USE_BBOX,
ID_PHACKENABLE,
ID_PHSETTINGS,
ID_ENABLEPROGRESSIVESCAN,
ID_ENABLEWIDESCREEN,
ID_EDITCONFIG,
Expand Down Expand Up @@ -198,7 +195,6 @@ class CISOProperties : public wxDialog
void CheckPartitionIntegrity(wxCommandEvent& event);
void SetRefresh(wxCommandEvent& event);
void OnChangeBannerLang(wxCommandEvent& event);
void PHackButtonClicked(wxCommandEvent& event);

GameListItem *OpenGameListItem;

Expand Down
152 changes: 0 additions & 152 deletions Source/Core/DolphinWX/PHackSettings.cpp

This file was deleted.

56 changes: 0 additions & 56 deletions Source/Core/DolphinWX/PHackSettings.h

This file was deleted.

0 comments on commit f6995d1

Please sign in to comment.