summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2010-11-15 09:54:07 +0000
committerJordan Woyak <jordan.woyak@gmail.com>2010-11-15 09:54:07 +0000
commitdb35fe4100f47c8bc569352658c9269e7bceaae9 (patch)
tree08a4978d99461faa70c76df0c5458c647fc173a7 /Source
parent73ed235fd19c4c19c3b6d56ce6d9631980487b0d (diff)
Made the graphics plugins use a shared configuration dialog. There are a few minor issues: unsupported settings are shown, dx9 3d settings are missing, tabs/groups could be organized better, could use tooltips, cmake and scons need to be fixed.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6422 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/VideoCommon/Src/VideoConfig.h2
-rw-r--r--Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp332
-rw-r--r--Source/Core/VideoUICommon/Src/VideoConfigDiag.h71
-rw-r--r--Source/Core/VideoUICommon/VideoUICommon.vcproj418
-rw-r--r--Source/Dolphin.sln24
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Plugin_VideoDX11.vcproj26
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.cpp299
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.h20
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/main.cpp26
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj24
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp588
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h199
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/main.cpp28
-rw-r--r--Source/Plugins/Plugin_VideoOGL/CMakeLists.txt1
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj72
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp785
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h227
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/SConscript1
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/main.cpp39
19 files changed, 943 insertions, 2239 deletions
diff --git a/Source/Core/VideoCommon/Src/VideoConfig.h b/Source/Core/VideoCommon/Src/VideoConfig.h
index 2eaf35ee30..5956771c82 100644
--- a/Source/Core/VideoCommon/Src/VideoConfig.h
+++ b/Source/Core/VideoCommon/Src/VideoConfig.h
@@ -122,7 +122,7 @@ struct VideoConfig
bool bCopyEFBToTexture;
bool bCopyEFBScaled;
bool bSafeTextureCache;
- int iSafeTextureCache_ColorSamples;
+ int iSafeTextureCache_ColorSamples;
int iFIFOWatermarkTightness;
int iPhackvalue;
bool bPhackvalue1, bPhackvalue2;
diff --git a/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp
new file mode 100644
index 0000000000..f1fcb99a84
--- /dev/null
+++ b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp
@@ -0,0 +1,332 @@
+
+#include "VideoConfigDiag.h"
+
+#define _connect_macro_(b, f, c, s) (b)->Connect(wxID_ANY, (c), wxCommandEventHandler( f ), (wxObject*)0, (wxEvtHandler*)s)
+
+// template instantiation
+template class BoolSetting<wxCheckBox>;
+template class BoolSetting<wxRadioButton>;
+
+typedef BoolSetting<wxCheckBox> SettingCheckBox;
+typedef BoolSetting<wxRadioButton> SettingRadioButton;
+
+SettingCheckBox::BoolSetting(wxWindow* parent, const wxString& label, bool &setting, bool reverse, long style)
+ : wxCheckBox(parent, -1, label, wxDefaultPosition, wxDefaultSize, style)
+ , m_setting(setting)
+ , m_reverse(reverse)
+{
+ SetValue(m_setting ^ m_reverse);
+ _connect_macro_(this, BoolSetting<W>::UpdateValue, wxEVT_COMMAND_CHECKBOX_CLICKED, this);
+}
+
+SettingRadioButton::BoolSetting(wxWindow* parent, const wxString& label, bool &setting, bool reverse, long style)
+ : wxRadioButton(parent, -1, label, wxDefaultPosition, wxDefaultSize, style)
+ , m_setting(setting)
+ , m_reverse(reverse)
+{
+ SetValue(m_setting ^ m_reverse);
+ _connect_macro_(this, BoolSetting<W>::UpdateValue, wxEVT_COMMAND_RADIOBUTTON_SELECTED, this);
+}
+
+SettingChoice::SettingChoice(wxWindow* parent, int &setting, int num, const wxString choices[])
+ : wxChoice(parent, -1, wxDefaultPosition, wxDefaultSize, num, choices)
+ , m_setting(setting)
+{
+ Select(m_setting);
+ _connect_macro_(this, SettingChoice::UpdateValue, wxEVT_COMMAND_CHOICE_SELECTED, this);
+}
+
+void SettingChoice::UpdateValue(wxCommandEvent& ev)
+{
+ m_setting = ev.GetInt();
+}
+
+void VideoConfigDiag::CloseDiag(wxCommandEvent&)
+{
+ Close();
+}
+
+VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title,
+ const std::vector<std::string> &adapters,
+ const std::vector<std::string> &aamodes,
+ const std::vector<std::string> &ppshader
+ )
+ : wxDialog(parent, -1,
+ wxString(wxT("Dolphin ")).append(wxString::FromAscii(title.c_str())).append(wxT(" Graphics Configuration")),
+ wxDefaultPosition, wxDefaultSize)
+ , vconfig(g_Config)
+{
+ wxNotebook* const notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize);
+
+ // -- GENERAL --
+ {
+ wxPanel* const page_general = new wxPanel(notebook, -1, wxDefaultPosition);
+ notebook->AddPage(page_general, wxT("General"));
+ wxBoxSizer* const szr_general = new wxBoxSizer(wxVERTICAL);
+
+ // - basic
+ {
+ wxStaticBoxSizer* const group_basic = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Basic"));
+ szr_general->Add(group_basic, 0, wxEXPAND | wxALL, 5);
+ wxFlexGridSizer* const szr_basic = new wxFlexGridSizer(2, 5, 5);
+ group_basic->Add(szr_basic, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ // graphics api
+ //{
+ //const wxString gfxapi_choices[] = { wxT("Software [not present]"),
+ // wxT("OpenGL [broken]"), wxT("Direct3D 9 [broken]"), wxT("Direct3D 11") };
+
+ //szr_basic->Add(new wxStaticText(page_general, -1, wxT("Graphics API:")), 1, wxALIGN_CENTER_VERTICAL, 0);
+ //wxChoice* const choice_gfxapi = new SettingChoice(page_general,
+ // g_gfxapi, sizeof(gfxapi_choices)/sizeof(*gfxapi_choices), gfxapi_choices);
+ //szr_basic->Add(choice_gfxapi, 1, 0, 0);
+ //}
+
+ // adapter // for D3D only
+ if (adapters.size())
+ {
+ szr_basic->Add(new wxStaticText(page_general, -1, wxT("Adapter:")), 1, wxALIGN_CENTER_VERTICAL, 5);
+ wxChoice* const choice_adapter = new SettingChoice(page_general, vconfig.iAdapter);
+
+ std::vector<std::string>::const_iterator
+ it = adapters.begin(),
+ itend = adapters.end();
+ for (; it != itend; ++it)
+ choice_adapter->AppendString(wxString::FromAscii(it->c_str()));
+
+ choice_adapter->Select(vconfig.iAdapter);
+
+ szr_basic->Add(choice_adapter, 1, 0, 0);
+ }
+
+ // aspect-ratio
+ {
+ const wxString ar_choices[] = { wxT("Auto [recommended]"),
+ wxT("Force 16:9"), wxT("Force 4:3"), wxT("Strech to Window") };
+
+ szr_basic->Add(new wxStaticText(page_general, -1, wxT("Aspect ratio:")), 1, wxALIGN_CENTER_VERTICAL, 0);
+ wxChoice* const choice_aspect = new SettingChoice(page_general,
+ vconfig.iAspectRatio, sizeof(ar_choices)/sizeof(*ar_choices), ar_choices);
+ szr_basic->Add(choice_aspect, 1, 0, 0);
+ }
+
+ // widescreen hack
+ {
+ szr_basic->AddStretchSpacer(1);
+ szr_basic->Add(new SettingCheckBox(page_general, wxT("Widescreen Hack"), vconfig.bWidescreenHack), 1, 0, 0);
+ szr_basic->AddStretchSpacer(1);
+ szr_basic->Add(new SettingCheckBox(page_general, wxT("V-Sync"), vconfig.bVSync), 1, 0, 0);
+ }
+
+ // enhancements
+ {
+ wxStaticBoxSizer* const group_enh = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Enhancements"));
+ szr_general->Add(group_enh, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+ wxFlexGridSizer* const szr_enh = new wxFlexGridSizer(2, 5, 5);
+ group_enh->Add(szr_enh, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ szr_enh->Add(new wxStaticText(page_general, -1, wxT("Anisotropic Filtering:")), 1, wxALIGN_CENTER_VERTICAL, 0);
+ const wxString af_choices[] = {wxT("1x"), wxT("2x"), wxT("4x"), wxT("8x"), wxT("16x")};
+ szr_enh->Add(new SettingChoice(page_general, vconfig.iMaxAnisotropy, 5, af_choices), 0, wxBOTTOM | wxLEFT, 5);
+
+ if (aamodes.size())
+ {
+ szr_enh->Add(new wxStaticText(page_general, -1, wxT("Anti-Aliasing:")), 1, wxALIGN_CENTER_VERTICAL, 0);
+
+ SettingChoice *const choice_aamode = new SettingChoice(page_general, vconfig.iMultisampleMode);
+
+ std::vector<std::string>::const_iterator
+ it = aamodes.begin(),
+ itend = aamodes.end();
+ for (; it != itend; ++it)
+ choice_aamode->AppendString(wxString::FromAscii(it->c_str()));
+
+ choice_aamode->Select(vconfig.iMultisampleMode);
+
+ szr_enh->Add(choice_aamode, 0, wxBOTTOM | wxLEFT, 5);
+ }
+
+ szr_enh->Add(new SettingCheckBox(page_general, wxT("Load Native Mipmaps"), vconfig.bUseNativeMips));
+ szr_enh->Add(new SettingCheckBox(page_general, wxT("EFB Scaled Copy"), vconfig.bCopyEFBScaled));
+ szr_enh->Add(new SettingCheckBox(page_general, wxT("Pixel Lighting"), vconfig.bEnablePixelLigting));
+ szr_enh->Add(new SettingCheckBox(page_general, wxT("Force Bi/Trilinear Filtering"), vconfig.bForceFiltering));
+ }
+
+ // - EFB
+ {
+ wxStaticBoxSizer* const group_efb = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("EFB"));
+ szr_general->Add(group_efb, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ // EFB scale
+ {
+ wxBoxSizer* const efb_scale_szr = new wxBoxSizer(wxHORIZONTAL);
+ // TODO: give this a label
+ const wxString efbscale_choices[] = { wxT("Fractional"), wxT("Integral [recommended]"),
+ wxT("1x"), wxT("2x"), wxT("3x")/*, wxT("4x")*/ };
+
+ wxChoice *const choice_efbscale = new SettingChoice(page_general,
+ vconfig.iEFBScale, sizeof(efbscale_choices)/sizeof(*efbscale_choices), efbscale_choices);
+
+ efb_scale_szr->Add(new wxStaticText(page_general, -1, wxT("Scale:")), 0, wxALIGN_CENTER_VERTICAL, 5);
+ //efb_scale_szr->AddStretchSpacer(1);
+ efb_scale_szr->Add(choice_efbscale, 0, wxBOTTOM | wxLEFT, 5);
+
+ group_efb->Add(efb_scale_szr, 0, wxBOTTOM | wxLEFT, 5);
+ }
+
+ group_efb->Add(new SettingCheckBox(page_general, wxT("Enable CPU Access"), vconfig.bEFBAccessEnable), 0, wxBOTTOM | wxLEFT, 5);
+
+ // EFB copy
+ wxStaticBoxSizer* const group_efbcopy = new wxStaticBoxSizer(wxHORIZONTAL, page_general, wxT("Copy"));
+ group_efb->Add(group_efbcopy, 0, wxEXPAND | wxBOTTOM, 5);
+
+ group_efbcopy->Add(new SettingCheckBox(page_general, wxT("Enable"), vconfig.bEFBCopyDisable, true), 0, wxLEFT | wxRIGHT | wxBOTTOM, 5);
+ group_efbcopy->AddStretchSpacer(1);
+ group_efbcopy->Add(new SettingRadioButton(page_general, wxT("Texture"), vconfig.bCopyEFBToTexture, false, wxRB_GROUP), 0, wxRIGHT, 5);
+ group_efbcopy->Add(new SettingRadioButton(page_general, wxT("RAM"), vconfig.bCopyEFBToTexture, true), 0, wxRIGHT, 5);
+ }
+
+ // - safe texture cache
+ {
+ wxStaticBoxSizer* const group_safetex = new wxStaticBoxSizer(wxHORIZONTAL, page_general, wxT("Safe Texture Cache"));
+ szr_general->Add(group_safetex, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ // safe texture cache
+ group_safetex->Add(new SettingCheckBox(page_general, wxT("Enable"), vconfig.bSafeTextureCache), 0, wxLEFT | wxRIGHT | wxBOTTOM, 5);
+ group_safetex->AddStretchSpacer(1);
+
+ wxRadioButton* stc_btn = new wxRadioButton(page_general, -1, wxT("Safe"),
+ wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
+ _connect_macro_(stc_btn, VideoConfigDiag::Event_StcSafe, wxEVT_COMMAND_RADIOBUTTON_SELECTED, this);
+ group_safetex->Add(stc_btn, 0, wxRIGHT, 5);
+ if (0 == vconfig.iSafeTextureCache_ColorSamples)
+ stc_btn->SetValue(true);
+
+ stc_btn = new wxRadioButton(page_general, -1, wxT("Normal"));
+ _connect_macro_(stc_btn, VideoConfigDiag::Event_StcNormal, wxEVT_COMMAND_RADIOBUTTON_SELECTED, this);
+ group_safetex->Add(stc_btn, 0, wxRIGHT, 5);
+ if (512 == vconfig.iSafeTextureCache_ColorSamples)
+ stc_btn->SetValue(true);
+
+ stc_btn = new wxRadioButton(page_general, -1, wxT("Fast"));
+ _connect_macro_(stc_btn, VideoConfigDiag::Event_StcFast, wxEVT_COMMAND_RADIOBUTTON_SELECTED, this);
+ group_safetex->Add(stc_btn, 0, wxRIGHT, 5);
+ if (128 == vconfig.iSafeTextureCache_ColorSamples)
+ stc_btn->SetValue(true);
+ }
+
+ }
+
+ page_general->SetSizerAndFit(szr_general);
+ }
+
+ // -- ADVANCED --
+ {
+ wxPanel* const page_advanced = new wxPanel(notebook, -1, wxDefaultPosition);
+ notebook->AddPage(page_advanced, wxT("Advanced"));
+ wxBoxSizer* const szr_advanced = new wxBoxSizer(wxVERTICAL);
+
+ // - rendering
+ {
+ wxStaticBoxSizer* const group_rendering = new wxStaticBoxSizer(wxVERTICAL, page_advanced, wxT("Rendering"));
+ szr_advanced->Add(group_rendering, 0, wxEXPAND | wxALL, 5);
+ wxGridSizer* const szr_rendering = new wxGridSizer(2, 5, 5);
+ group_rendering->Add(szr_rendering, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ szr_rendering->Add(new SettingCheckBox(page_advanced, wxT("Enable Wireframe"), vconfig.bWireFrame));
+ szr_rendering->Add(new SettingCheckBox(page_advanced, wxT("Disable Lighting"), vconfig.bDisableLighting));
+ szr_rendering->Add(new SettingCheckBox(page_advanced, wxT("Disable Textures"), vconfig.bDisableTexturing));
+ szr_rendering->Add(new SettingCheckBox(page_advanced, wxT("Disable Fog"), vconfig.bDisableFog));
+ szr_rendering->Add(new SettingCheckBox(page_advanced, wxT("Disable Dest. Alpha Pass"), vconfig.bDstAlphaPass));
+ }
+
+ // - info
+ {
+ wxStaticBoxSizer* const group_info = new wxStaticBoxSizer(wxVERTICAL, page_advanced, wxT("Overlay Information"));
+ szr_advanced->Add(group_info, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+ wxGridSizer* const szr_info = new wxGridSizer(2, 5, 5);
+ group_info->Add(szr_info, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ szr_info->Add(new SettingCheckBox(page_advanced, wxT("Show FPS"), vconfig.bShowFPS));
+ szr_info->Add(new SettingCheckBox(page_advanced, wxT("Various Statistics"), vconfig.bOverlayStats));
+ szr_info->Add(new SettingCheckBox(page_advanced, wxT("Projection Stats"), vconfig.bOverlayProjStats));
+ szr_info->Add(new SettingCheckBox(page_advanced, wxT("Texture Format"), vconfig.bTexFmtOverlayEnable));
+ szr_info->Add(new SettingCheckBox(page_advanced, wxT("EFB Copy Regions"), vconfig.bShowEFBCopyRegions));
+ }
+
+ // - XFB
+ {
+ wxStaticBoxSizer* const group_xfb = new wxStaticBoxSizer(wxHORIZONTAL, page_advanced, wxT("XFB"));
+ szr_advanced->Add(group_xfb, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ group_xfb->Add(new SettingCheckBox(page_advanced, wxT("Enable"), vconfig.bUseXFB), 0, wxLEFT | wxRIGHT | wxBOTTOM, 5);
+ group_xfb->AddStretchSpacer(1);
+ group_xfb->Add(new SettingRadioButton(page_advanced, wxT("Virtual"), vconfig.bUseRealXFB, true, wxRB_GROUP), 0, wxRIGHT, 5);
+ group_xfb->Add(new SettingRadioButton(page_advanced, wxT("Real"), vconfig.bUseRealXFB), 0, wxRIGHT, 5);
+ }
+
+ // - utility
+ {
+ wxStaticBoxSizer* const group_utility = new wxStaticBoxSizer(wxVERTICAL, page_advanced, wxT("Utility"));
+ szr_advanced->Add(group_utility, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+ wxGridSizer* const szr_utility = new wxGridSizer(2, 5, 5);
+ group_utility->Add(szr_utility, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ szr_utility->Add(new SettingCheckBox(page_advanced, wxT("Dump Textures"), vconfig.bDumpTextures));
+ szr_utility->Add(new SettingCheckBox(page_advanced, wxT("Load Hi-Res Textures"), vconfig.bHiresTextures));
+ szr_utility->Add(new SettingCheckBox(page_advanced, wxT("Dump EFB Target"), vconfig.bDumpEFBTarget));
+ szr_utility->Add(new SettingCheckBox(page_advanced, wxT("Dump Frames"), vconfig.bDumpFrames));
+ szr_utility->Add(new SettingCheckBox(page_advanced, wxT("Free Look"), vconfig.bFreeLook));
+ }
+
+ // - misc
+ {
+ wxStaticBoxSizer* const group_misc = new wxStaticBoxSizer(wxVERTICAL, page_advanced, wxT("Misc"));
+ szr_advanced->Add(group_misc, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+ wxFlexGridSizer* const szr_misc = new wxFlexGridSizer(2, 5, 5);
+ group_misc->Add(szr_misc, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
+
+ szr_misc->Add(new SettingCheckBox(page_advanced, wxT("Crop"), vconfig.bCrop));
+ szr_misc->Add(new SettingCheckBox(page_advanced, wxT("Enable OpenCL"), vconfig.bEnableOpenCL));
+ szr_misc->Add(new SettingCheckBox(page_advanced, wxT("Enable Display List Caching"), vconfig.bDlistCachingEnable));
+ szr_misc->Add(new SettingCheckBox(page_advanced, wxT("Enable Hotkeys"), vconfig.bOSDHotKey));
+
+ // postproc shader
+ if (ppshader.size())
+ {
+ szr_misc->Add(new wxStaticText(page_advanced, -1, wxT("Post-Processing Shader:")), 1, wxALIGN_CENTER_VERTICAL, 0);
+
+ wxChoice *const choice_ppshader = new wxChoice(page_advanced, -1, wxDefaultPosition);
+ choice_ppshader->AppendString(wxT("(off)"));
+
+ std::vector<std::string>::const_iterator
+ it = ppshader.begin(),
+ itend = ppshader.end();
+ for (; it != itend; ++it)
+ choice_ppshader->AppendString(wxString::FromAscii(it->c_str()));
+
+ if (vconfig.sPostProcessingShader.empty())
+ choice_ppshader->Select(0);
+ else
+ choice_ppshader->SetStringSelection(wxString::FromAscii(vconfig.sPostProcessingShader.c_str()));
+
+ _connect_macro_(choice_ppshader, VideoConfigDiag::Event_PPShader, wxEVT_COMMAND_CHOICE_SELECTED, this);
+
+ szr_misc->Add(choice_ppshader, 0, wxLEFT, 5);
+ }
+
+ }
+
+ page_advanced->SetSizerAndFit(szr_advanced);
+ }
+
+ wxButton* const btn_close = new wxButton(this, -1, wxT("Close"), wxDefaultPosition);
+ _connect_macro_(btn_close, VideoConfigDiag::CloseDiag, wxEVT_COMMAND_BUTTON_CLICKED, this);
+
+ wxBoxSizer* const szr_main = new wxBoxSizer(wxVERTICAL);
+ szr_main->Add(notebook, 1, wxEXPAND | wxALL, 5);
+ szr_main->Add(btn_close, 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 5);
+
+ SetSizerAndFit(szr_main);
+ Center();
+}
diff --git a/Source/Core/VideoUICommon/Src/VideoConfigDiag.h b/Source/Core/VideoUICommon/Src/VideoConfigDiag.h
new file mode 100644
index 0000000000..2a5dbdf836
--- /dev/null
+++ b/Source/Core/VideoUICommon/Src/VideoConfigDiag.h
@@ -0,0 +1,71 @@
+
+#ifndef _CONFIG_DIAG_H_
+#define _CONFIG_DIAG_H_
+
+#include <vector>
+#include <string>
+
+#include "VideoConfig.h"
+
+#include <wx/wx.h>
+#include <wx/textctrl.h>
+#include <wx/button.h>
+#include <wx/stattext.h>
+#include <wx/combobox.h>
+#include <wx/checkbox.h>
+#include <wx/notebook.h>
+#include <wx/panel.h>
+#include <wx/spinctrl.h>
+
+template <typename W>
+class BoolSetting : public W
+{
+public:
+ BoolSetting(wxWindow* parent, const wxString& label, bool &setting, bool reverse = false, long style = 0);
+
+ void UpdateValue(wxCommandEvent& ev)
+ {
+ m_setting = (ev.GetInt() != 0) ^ m_reverse;
+ }
+private:
+ bool &m_setting;
+ const bool m_reverse;
+};
+
+class SettingChoice : public wxChoice
+{
+public:
+ SettingChoice(wxWindow* parent, int &setting, int num = 0, const wxString choices[] = NULL);
+ void UpdateValue(wxCommandEvent& ev);
+private:
+ int &m_setting;
+};
+
+class VideoConfigDiag : public wxDialog
+{
+public:
+ VideoConfigDiag(wxWindow* parent, const std::string &title,
+ const std::vector<std::string> &adapters = std::vector<std::string>(),
+ const std::vector<std::string> &aamodes = std::vector<std::string>(),
+ const std::vector<std::string> &ppshader = std::vector<std::string>());
+
+ VideoConfig &vconfig;
+
+protected:
+ void Event_StcSafe(wxCommandEvent &) { vconfig.iSafeTextureCache_ColorSamples = 0; }
+ void Event_StcNormal(wxCommandEvent &) { vconfig.iSafeTextureCache_ColorSamples = 512; }
+ void Event_StcFast(wxCommandEvent &) { vconfig.iSafeTextureCache_ColorSamples = 128; }
+
+ void Event_PPShader(wxCommandEvent &ev)
+ {
+ const int sel = ev.GetInt();
+ if (sel)
+ vconfig.sPostProcessingShader = ev.GetString().mb_str();
+ else
+ vconfig.sPostProcessingShader.clear();
+ }
+
+ void CloseDiag(wxCommandEvent&);
+};
+
+#endif
diff --git a/Source/Core/VideoUICommon/VideoUICommon.vcproj b/Source/Core/VideoUICommon/VideoUICommon.vcproj
new file mode 100644
index 0000000000..97bca74aa9
--- /dev/null
+++ b/Source/Core/VideoUICommon/VideoUICommon.vcproj
@@ -0,0 +1,418 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="VideoUICommon"
+ ProjectGUID="{56C4B06E-F2C9-4729-A15A-DD327A9AA465}"
+ RootNamespace="VideoUICommon"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\VideoCommon\Src;..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\VideoCommon\Src;..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\VideoCommon\Src;..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\VideoCommon\Src;..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugFast|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\VideoCommon\Src;..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugFast|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\VideoCommon\Src;..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\Src\VideoConfigDiag.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\VideoConfigDiag.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Source/Dolphin.sln b/Source/Dolphin.sln
index baad316a02..0e007d0e7f 100644
--- a/Source/Dolphin.sln
+++ b/Source/Dolphin.sln
@@ -17,6 +17,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoDX9", "Plugins\Plugin_VideoDX9\Plugin_VideoDX9.vcproj", "{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}"
ProjectSection(ProjectDependencies) = postProject
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465} = {56C4B06E-F2C9-4729-A15A-DD327A9AA465}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}
@@ -46,6 +47,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoOGL", "Plugins\
{C7E5D50A-2916-464B-86A7-E10B3CC88ADA} = {C7E5D50A-2916-464B-86A7-E10B3CC88ADA}
{05C75041-D67D-4903-A362-8395A7B35C75} = {05C75041-D67D-4903-A362-8395A7B35C75}
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465} = {56C4B06E-F2C9-4729-A15A-DD327A9AA465}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
@@ -238,6 +240,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoDX11", "Plugins\Plugin_VideoDX11\Plugin_VideoDX11.vcproj", "{21DBE606-2958-43AC-A14E-B6B798D56554}"
ProjectSection(ProjectDependencies) = postProject
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465} = {56C4B06E-F2C9-4729-A15A-DD327A9AA465}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}
{B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
@@ -256,6 +259,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wiiuse", "Core\wiiuse\wiius
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoUICommon", "Core\VideoUICommon\VideoUICommon.vcproj", "{56C4B06E-F2C9-4729-A15A-DD327A9AA465}"
+ ProjectSection(ProjectDependencies) = postProject
+ {05C75041-D67D-4903-A362-8395A7B35C75} = {05C75041-D67D-4903-A362-8395A7B35C75}
+ {11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
+ {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
+ {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
+ {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -650,6 +662,18 @@ Global
{52F70249-373A-4401-A70A-FF22760EC1B8}.Release|Win32.Build.0 = Release|Win32
{52F70249-373A-4401-A70A-FF22760EC1B8}.Release|x64.ActiveCfg = Release|x64
{52F70249-373A-4401-A70A-FF22760EC1B8}.Release|x64.Build.0 = Release|x64
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Debug|Win32.ActiveCfg = Debug|Win32
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Debug|Win32.Build.0 = Debug|Win32
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Debug|x64.ActiveCfg = Debug|x64
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Debug|x64.Build.0 = Debug|x64
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.DebugFast|Win32.ActiveCfg = DebugFast|Win32
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.DebugFast|Win32.Build.0 = DebugFast|Win32
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.DebugFast|x64.ActiveCfg = DebugFast|x64
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.DebugFast|x64.Build.0 = DebugFast|x64
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Release|Win32.ActiveCfg = Release|Win32
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Release|Win32.Build.0 = Release|Win32
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Release|x64.ActiveCfg = Release|x64
+ {56C4B06E-F2C9-4729-A15A-DD327A9AA465}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Source/Plugins/Plugin_VideoDX11/Plugin_VideoDX11.vcproj b/Source/Plugins/Plugin_VideoDX11/Plugin_VideoDX11.vcproj
index 2f7907e94c..d28b04f0b2 100644
--- a/Source/Plugins/Plugin_VideoDX11/Plugin_VideoDX11.vcproj
+++ b/Source/Plugins/Plugin_VideoDX11/Plugin_VideoDX11.vcproj
@@ -58,7 +58,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
RuntimeLibrary="0"
@@ -166,7 +166,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
ExceptionHandling="1"
@@ -269,7 +269,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -366,7 +366,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -468,7 +468,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;DEBUGFAST"
StringPooling="true"
RuntimeLibrary="0"
@@ -576,7 +576,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;;DEBUGFAST"
StringPooling="true"
ExceptionHandling="1"
@@ -824,18 +824,6 @@
>
</File>
</Filter>
- <Filter
- Name="UI"
- >
- <File
- RelativePath=".\Src\DlgSettings.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\DlgSettings.h"
- >
- </File>
- </Filter>
<File
RelativePath=".\Src\Globals.h"
>
@@ -859,4 +847,4 @@
</Files>
<Globals>
</Globals>
-</VisualStudioProject> \ No newline at end of file
+</VisualStudioProject>
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.cpp b/Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.cpp
deleted file mode 100644
index 23dc5e6edc..0000000000
--- a/Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.cpp
+++ /dev/null
@@ -1,299 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// 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/
-
-#include <vector>
-#include <windowsx.h>
-
-#include "resource.h"
-#include "W32Util/PropertySheet.h"
-#include "FileUtil.h"
-
-#include "D3DBase.h"
-#include "VideoConfig.h"
-#include "TextureCache.h"
-using std::vector;
-
-const char* aspect_ratio_names[4] = {
- "Auto",
- "Force 16:9 Widescreen",
- "Force 4:3 Standard",
- "Stretch to Window",
-};
-
-vector<IDXGIAdapter*> CreateAdapterList()
-{
- vector<IDXGIAdapter*> adapters;
- IDXGIFactory* factory;
- IDXGIAdapter* ad;
- HRESULT hr = CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
- if (FAILED(hr)) MessageBox(NULL, _T("Failed to create IDXGIFactory object"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
-
- while (factory->EnumAdapters(adapters.size(), &ad) != DXGI_ERROR_NOT_FOUND)
- adapters.push_back(ad);
-
- if (adapters.size() == 0) MessageBox(NULL, _T("Couldn't find any devices!"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
- factory->Release();
- return adapters;
-}
-
-void DestroyAdapterList(vector<IDXGIAdapter*> &adapters)
-{
- while (!adapters.empty())
- {
- adapters.back()->Release();
- adapters.pop_back();
- }
-}
-
-struct TabDirect3D : public W32Util::Tab
-{
- void Init(HWND hDlg)
- {
- WCHAR tempwstr[2000];
- HRESULT hr;
-
- vector<IDXGIAdapter*> adapters = CreateAdapterList();
- for (vector<IDXGIAdapter*>::iterator it = adapters.begin();it != adapters.end();++it)
- {
- DXGI_ADAPTER_DESC desc;
- hr = (*it)->GetDesc(&desc);
- if (SUCCEEDED(hr)) ComboBox_AddString(GetDlgItem(hDlg, IDC_ADAPTER), desc.Description);
- else
- {
- MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, "Unknown device", -1, tempwstr, 2000);
- ComboBox_AddString(GetDlgItem(hDlg, IDC_ADAPTER), tempwstr);
- }
- }
- DestroyAdapterList(adapters);
- ComboBox_SetCurSel(GetDlgItem(hDlg, IDC_ADAPTER), g_Config.iAdapter);
-
- for (unsigned int i = 0; i < 4; i++)
- {
- MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, aspect_ratio_names[i], -1, tempwstr, 2000);
- ComboBox_AddString(GetDlgItem(hDlg, IDC_ASPECTRATIO), tempwstr);
- }
- ComboBox_SetCurSel(GetDlgItem(hDlg, IDC_ASPECTRATIO), g_Config.iAspectRatio);
-
- for (unsigned int i = 0; i < 5; i++)
- {
- const char* options[] = {
- "Auto (quality)",
- "Auto (compatibility)",
- "Native (640x528)",
- "2x (1280x1056)",
- "3x (1920x1584)"
- };
- MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, options[i], -1, tempwstr, 2000);
- ComboBox_AddString(GetDlgItem(hDlg, IDC_INTERNALRESOLUTION), tempwstr);
- }
- ComboBox_SetCurSel(GetDlgItem(hDlg, IDC_INTERNALRESOLUTION), g_Config.iEFBScale);
-
-
- Button_SetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK), g_Config.bWidescreenHack);
- Button_SetCheck(GetDlgItem(hDlg, IDC_VSYNC), g_Config.bVSync);
- Button_SetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE), g_Config.bSafeTextureCache);
- Button_SetCheck(GetDlgItem(hDlg, IDC_DLIST_CACHING), g_Config.bDlistCachingEnable);
- Button_SetCheck(GetDlgItem(hDlg, IDC_ENABLEPIXELLIGHTING), g_Config.bEnablePixelLigting);
-
-
- if (g_Config.iSafeTextureCache_ColorSamples == 0)
- {
- Button_SetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_SAFE), true);
- }
- else
- {
- if (g_Config.iSafeTextureCache_ColorSamples > 128)
- {
- Button_SetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_NORMAL), true);
- }
- else
- {
- Button_SetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_FAST), true);
- }
- }
- Button_Enable(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_SAFE), g_Config.bSafeTextureCache);
- Button_Enable(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_NORMAL), g_Config.bSafeTextureCache);
- Button_Enable(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_FAST), g_Config.bSafeTextureCache);
-
- Button_SetCheck(GetDlgItem(hDlg, IDC_EFB_ACCESS_ENABLE), g_Config.bEFBAccessEnable);
- }
-
- void Command(HWND hDlg,WPARAM wParam)
- {
- switch (LOWORD(wParam))
- {
- case IDC_ASPECTRATIO:
- g_Config.iAspectRatio = ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_ASPECTRATIO));
- break;
- case IDC_ADAPTER:
- g_Config.iAdapter = ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_ADAPTER));
- break;
- case IDC_INTERNALRESOLUTION:
- g_Config.iEFBScale = ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_INTERNALRESOLUTION));
- break;
- case IDC_VSYNC:
- g_Config.bVSync = Button_GetCheck(GetDlgItem(hDlg, IDC_VSYNC)) ? true : false;
- break;
- case IDC_WIDESCREEN_HACK:
- g_Config.bWidescreenHack = Button_GetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK)) ? true : false;
- break;
- case IDC_SAFE_TEXTURE_CACHE:
- g_Config.bSafeTextureCache = Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE)) == 0 ? false : true;
- Button_Enable(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_SAFE), g_Config.bSafeTextureCache);
- Button_Enable(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_NORMAL), g_Config.bSafeTextureCache);
- Button_Enable(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_FAST), g_Config.bSafeTextureCache);
- break;
- case IDC_DLIST_CACHING:
- g_Config.bDlistCachingEnable = Button_GetCheck(GetDlgItem(hDlg, IDC_DLIST_CACHING)) == 0 ? false : true;
- break;
- case IDC_ENABLEPIXELLIGHTING:
- g_Config.bEnablePixelLigting = Button_GetCheck(GetDlgItem(hDlg, IDC_ENABLEPIXELLIGHTING)) == 0 ? false : true;
- break;
- case IDC_EFB_ACCESS_ENABLE:
- g_Config.bEFBAccessEnable = Button_GetCheck(GetDlgItem(hDlg, IDC_EFB_ACCESS_ENABLE)) == 0 ? false : true;
- break;
- default:
- break;
- }
- }
-
- void Apply(HWND hDlg)
- {
- if (Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_SAFE)))
- {
- g_Config.iSafeTextureCache_ColorSamples = 0;
- }
- else
- {
- if (Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE_NORMAL)))
- {
- if (g_Config.iSafeTextureCache_ColorSamples < 512)
- {
- g_Config.iSafeTextureCache_ColorSamples = 512;
- }
- }
- else
- {
- if (g_Config.iSafeTextureCache_ColorSamples > 128 || g_Config.iSafeTextureCache_ColorSamples == 0)
- {
- g_Config.iSafeTextureCache_ColorSamples = 128;
- }
- }
- }
- g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx11.ini").c_str());
- }
-};
-
-struct TabAdvanced : public W32Util::Tab
-{
- void Init(HWND hDlg)
- {
- Button_SetCheck(GetDlgItem(hDlg, IDC_OSDHOTKEY), g_Config.bOSDHotKey);
- Button_SetCheck(GetDlgItem(hDlg, IDC_OVERLAYFPS), g_Config.bShowFPS);
- Button_SetCheck(GetDlgItem(hDlg, IDC_OVERLAYSTATS), g_Config.bOverlayStats);
- Button_SetCheck(GetDlgItem(hDlg, IDC_OVERLAYPROJSTATS), g_Config.bOverlayProjStats);
- Button_SetCheck(GetDlgItem(hDlg, IDC_WIREFRAME), g_Config.bWireFrame);
- Button_SetCheck(GetDlgItem(hDlg, IDC_DISABLEFOG), g_Config.bDisableFog);
- Button_SetCheck(GetDlgItem(hDlg, IDC_ENABLEEFBCOPY), !g_Config.bEFBCopyDisable);
-
- Button_SetCheck(GetDlgItem(hDlg, IDC_TEXFMT_OVERLAY), g_Config.bTexFmtOverlayEnable);
- Button_SetCheck(GetDlgItem(hDlg, IDC_TEXFMT_CENTER), g_Config.bTexFmtOverlayCenter);
- Button_GetCheck(GetDlgItem(hDlg, IDC_TEXFMT_OVERLAY)) ? Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), true) : Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), false);
-
- Button_SetCheck(GetDlgItem(hDlg, IDC_FORCEANISOTROPY),g_Config.iMaxAnisotropy > 1);
- Button_SetCheck(GetDlgItem(hDlg, IDC_EFBSCALEDCOPY), g_Config.bCopyEFBScaled);
-
- Button_SetCheck(GetDlgItem(hDlg, IDC_LOADHIRESTEXTURE),g_Config.bHiresTextures);
- Button_SetCheck(GetDlgItem(hDlg, IDC_DUMPTEXTURES),g_Config.bDumpTextures);
-
- if (Button_GetCheck(GetDlgItem(hDlg, IDC_ENABLEEFBCOPY))) Button_Enable(GetDlgItem(hDlg,IDC_EFBSCALEDCOPY), true);
- else Button_Enable(GetDlgItem(hDlg, IDC_EFBSCALEDCOPY), false);
- }
- void Command(HWND hDlg,WPARAM wParam)
- {
- switch (LOWORD(wParam))
- {
- case IDC_TEXFMT_OVERLAY:
- Button_GetCheck(GetDlgItem(hDlg, IDC_TEXFMT_OVERLAY)) ? Button_Enable(GetDlgItem(hDlg, IDC_TEXFMT_CENTER), true) : Button_Enable(GetDlgItem(hDlg, IDC_TEXFMT_CENTER), false);
- break;
-
- case IDC_ENABLEEFBCOPY:
- if (Button_GetCheck(GetDlgItem(hDlg, IDC_ENABLEEFBCOPY))) Button_Enable(GetDlgItem(hDlg, IDC_EFBSCALEDCOPY), true);
- else Button_Enable(GetDlgItem(hDlg, IDC_EFBSCALEDCOPY), false);
- break;
-
- default: break;
- }
- }
- void Apply(HWND hDlg)
- {
- g_Config.bTexFmtOverlayEnable = Button_GetCheck(GetDlgItem(hDlg, IDC_TEXFMT_OVERLAY)) ? true : false;
- g_Config.bTexFmtOverlayCenter = Button_GetCheck(GetDlgItem(hDlg, IDC_TEXFMT_CENTER)) ? true : false;
-
- g_Config.bOSDHotKey = Button_GetCheck(GetDlgItem(hDlg, IDC_OSDHOTKEY)) ? true : false;
- g_Config.bShowFPS = Button_GetCheck(GetDlgItem(hDlg, IDC_OVERLAYFPS)) ? true : false;
- g_Config.bOverlayStats = Button_GetCheck(GetDlgItem(hDlg, IDC_OVERLAYSTATS)) ? true : false;
- g_Config.bOverlayProjStats = Button_GetCheck(GetDlgItem(hDlg, IDC_OVERLAYPROJSTATS)) ? true : false;
- g_Config.bWireFrame = Button_GetCheck(GetDlgItem(hDlg, IDC_WIREFRAME)) ? true : false;
- g_Config.bDisableFog = Button_GetCheck(GetDlgItem(hDlg, IDC_DISABLEFOG)) ? true : false;
- g_Config.bEFBCopyDisable = Button_GetCheck(GetDlgItem(hDlg, IDC_ENABLEEFBCOPY)) ? false : true;
- g_Config.bCopyEFBToTexture = !g_Config.bEFBCopyDisable;
- g_Config.bDumpFrames = false;
- g_Config.bShowShaderErrors = true;
- g_Config.bUseNativeMips = true;
-
- g_Config.iMaxAnisotropy = Button_GetCheck(GetDlgItem(hDlg, IDC_FORCEANISOTROPY)) ? 16 : 1;
- g_Config.bForceFiltering = false;
- g_Config.bHiresTextures = Button_GetCheck(GetDlgItem(hDlg, IDC_LOADHIRESTEXTURE)) ? true : false;
- g_Config.bDumpTextures = Button_GetCheck(GetDlgItem(hDlg, IDC_DUMPTEXTURES)) ? true : false;
- g_Config.bCopyEFBScaled = Button_GetCheck(GetDlgItem(hDlg, IDC_EFBSCALEDCOPY)) ? true : false;
- g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx11.ini").c_str());
- }
-};
-
-struct TabAbout : public W32Util::Tab
-{
- void Init(HWND hDlg) {}
- void Command(HWND hDlg,WPARAM wParam) {}
- void Apply(HWND hDlg) {}
-};
-
-void DlgSettings_Show(HINSTANCE hInstance, HWND _hParent)
-{
- bool tfoe = g_Config.bTexFmtOverlayEnable;
- bool tfoc = g_Config.bTexFmtOverlayCenter;
-
- g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx11.ini").c_str());
- W32Util::PropSheet sheet;
- sheet.Add(new TabDirect3D, (LPCTSTR)IDD_SETTINGS, _T("Direct3D"));
- sheet.Add(new TabAdvanced, (LPCTSTR)IDD_ADVANCED, _T("Advanced"));
- sheet.Add(new TabAbout, (LPCTSTR)IDD_ABOUT, _T("About"));
-
-#ifdef DEBUGFAST
- sheet.Show(hInstance,_hParent,_T("DX11 Graphics Plugin (DEBUGFAST)"));
-#elif defined _DEBUG
- sheet.Show(hInstance,_hParent,_T("DX11 Graphics Plugin (DEBUG)"));
-#else
- sheet.Show(hInstance,_hParent,_T("DX11 Graphics Plugin"));
-#endif
-
- if ((tfoe != g_Config.bTexFmtOverlayEnable) ||
- ((g_Config.bTexFmtOverlayEnable) && ( tfoc != g_Config.bTexFmtOverlayCenter)))
- {
- TextureCache::Invalidate(false);
- }
-}
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.h b/Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.h
deleted file mode 100644
index 894f893a85..0000000000
--- a/Source/Plugins/Plugin_VideoDX11/Src/DlgSettings.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// 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/
-
-#pragma once
-
-void DlgSettings_Show(HINSTANCE hInstance, HWND parent); \ No newline at end of file
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp
index 699636bc4c..ae721c6ce4 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp
@@ -43,7 +43,7 @@
#include "main.h"
#include "resource.h"
-#include "DlgSettings.h"
+#include "VideoConfigDiag.h"
#include "TextureCache.h"
#include "VertexManager.h"
#include "VertexShaderCache.h"
@@ -166,7 +166,29 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
void DllConfig(void *_hParent)
{
- DlgSettings_Show(g_hInstance, (HWND)((wxWindow *)_hParent)->GetHandle());
+ std::vector<std::string> adapters;
+
+ IDXGIFactory* factory;
+ IDXGIAdapter* ad;
+ const HRESULT hr = CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
+ if (FAILED(hr))
+ PanicAlert("Failed to create IDXGIFactory object");
+
+ char tmpstr[512] = {};
+
+ DXGI_ADAPTER_DESC desc;
+ while (factory->EnumAdapters((UINT)adapters.size(), &ad) != DXGI_ERROR_NOT_FOUND)
+ {
+ ad->GetDesc(&desc);
+ WideCharToMultiByte(/*CP_UTF8*/CP_ACP, 0, desc.Description, -1, tmpstr, 512, 0, false);
+ adapters.push_back(tmpstr);
+ }
+
+ VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, "Direct3D11", adapters);
+ diag->ShowModal();
+ diag->Destroy();
+
+ g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx11.ini").c_str());
}
void Initialize(void *init)
diff --git a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj
index 7611069458..57a420f9d9 100644
--- a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj
+++ b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj
@@ -58,7 +58,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
RuntimeLibrary="0"
@@ -168,7 +168,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
ExceptionHandling="1"
@@ -273,7 +273,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -372,7 +372,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -476,7 +476,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../../Externals;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;DEBUGFAST"
StringPooling="true"
RuntimeLibrary="0"
@@ -586,7 +586,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
+ AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;;DEBUGFAST"
StringPooling="true"
ExceptionHandling="1"
@@ -780,18 +780,6 @@
</File>
</Filter>
<Filter
- Name="UI"
- >
- <File
- RelativePath=".\Src\DlgSettings.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\DlgSettings.h"
- >
- </File>
- </Filter>
- <Filter
Name="Debugger"
>
<File
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp
deleted file mode 100644
index 98f5454510..0000000000
--- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp
+++ /dev/null
@@ -1,588 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// 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/
-
-#include <wx/wx.h>
-#include <wx/sizer.h>
-#include <wx/filepicker.h>
-#include <wx/gbsizer.h>
-#include <wx/notebook.h>
-#include <wx/mimetype.h>
-
-#include "DlgSettings.h"
-#include "FileUtil.h"
-
-#include "D3DBase.h"
-#include "D3DUtil.h"
-
-#include "VideoConfig.h"
-
-#include "TextureCache.h"
-
-BEGIN_EVENT_TABLE(GFXConfigDialogDX,wxDialog)
-
- EVT_CLOSE(GFXConfigDialogDX::OnClose)
- EVT_BUTTON(ID_CLOSE, GFXConfigDialogDX::CloseClick)
-
- //Direct3D Tab
- EVT_CHECKBOX(ID_VSYNC, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_CHECKBOX(ID_WIDESCREEN_HACK, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_CHOICE(ID_ASPECT, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_CHOICE(ID_ANTIALIASMODE, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_CHOICE(ID_EFBSCALEMODE, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_CHECKBOX(ID_EFB_ACCESS_ENABLE, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_CHECKBOX(ID_SAFETEXTURECACHE, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_CHECKBOX(ID_DLISTCACHING, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_SAFE, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_NORMAL, GFXConfigDialogDX::DirectXSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_FAST, GFXConfigDialogDX::DirectXSettingsChanged)
-
- //Enhancements tab
- EVT_CHECKBOX(ID_FORCEFILTERING, GFXConfigDialogDX::EnhancementsSettingsChanged)
- EVT_CHECKBOX(ID_FORCEANISOTROPY, GFXConfigDialogDX::EnhancementsSettingsChanged)
- EVT_CHECKBOX(ID_LOADHIRESTEXTURES, GFXConfigDialogDX::EnhancementsSettingsChanged)
- EVT_CHECKBOX(ID_EFBSCALEDCOPY, GFXConfigDialogDX::EnhancementsSettingsChanged)
- EVT_CHECKBOX(ID_PIXELLIGHTING, GFXConfigDialogDX::EnhancementsSettingsChanged)
- EVT_CHECKBOX(ID_ENABLE_3DVISION, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_ANAGLYPH, GFXConfigDialogDX::EnhancementsSettingsChanged)
- EVT_SLIDER(ID_ANAGLYPHSEPARATION, GFXConfigDialogDX::EnhancementsSettingsChanged)
- EVT_SLIDER(ID_ANAGLYPHFOCALANGLE, GFXConfigDialogDX::EnhancementsSettingsChanged)
-
- //Advanced Tab
- EVT_CHECKBOX(ID_DISABLEFOG, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_OVERLAYFPS, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_ENABLEEFBCOPY, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_RADIOBUTTON(ID_EFBTORAM, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_RADIOBUTTON(ID_EFBTOTEX, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_ENABLEHOTKEY, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_WIREFRAME, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_ENABLEXFB, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_ENABLEREALXFB, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_USENATIVEMIPS, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_TEXDUMP, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DUMPFRAMES, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_OVERLAYSTATS, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_PROJSTATS, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_SHADERERRORS, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_TEXFMT_OVERLAY, GFXConfigDialogDX::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_TEXFMT_CENTER, GFXConfigDialogDX::AdvancedSettingsChanged)
-
-END_EVENT_TABLE()
-
-GFXConfigDialogDX::GFXConfigDialogDX(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
-: wxDialog(parent, id, title, position, size, style)
-{
-}
-// Close and unload the window
-// ---------------
-GFXConfigDialogDX::~GFXConfigDialogDX()
-{
- INFO_LOG(CONSOLE, "GFXConfigDialogDX closed");
-}
-
-void GFXConfigDialogDX::OnClose(wxCloseEvent& event)
-{
- //INFO_LOG(CONSOLE, "OnClose");
- CloseWindow();
-}
-
-void GFXConfigDialogDX::CloseClick(wxCommandEvent& WXUNUSED (event))
-{
- //INFO_LOG(CONSOLE, "CloseClick");
- CloseWindow();
-}
-
-void GFXConfigDialogDX::InitializeGUIValues()
-{
- // General Display Settings
- m_AdapterCB->SetSelection(g_Config.iAdapter);
- m_VSync->SetValue(g_Config.bVSync);
- m_WidescreenHack->SetValue(g_Config.bWidescreenHack);
- m_KeepAR->SetSelection(g_Config.iAspectRatio);
-
- m_MSAAModeCB->SetSelection(g_Config.iMultisampleMode);
- m_EFBScaleMode->SetSelection(g_Config.iEFBScale);
- m_EnableEFBAccess->SetValue(g_Config.bEFBAccessEnable);
- m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
- m_DlistCaching->SetValue(g_Config.bDlistCachingEnable);
- if(g_Config.iSafeTextureCache_ColorSamples == 0)
- m_Radio_SafeTextureCache_Safe->SetValue(true);
- else
- if(g_Config.iSafeTextureCache_ColorSamples > 128)
- m_Radio_SafeTextureCache_Normal->SetValue(true);
- else
- m_Radio_SafeTextureCache_Fast->SetValue(true);
-
- // Enhancements
- if(g_Config.iMaxAnisotropy == 1)
- m_MaxAnisotropy->SetValue(false);
- else
- {
- if(g_Config.iMaxAnisotropy == 8)
- m_MaxAnisotropy->SetValue(true);
- }
- m_ForceFiltering->SetValue(g_Config.bForceFiltering);
- m_HiresTextures->SetValue(g_Config.bHiresTextures);
- m_MSAAModeCB->SetSelection(g_Config.iMultisampleMode);
- m_EFBScaledCopy->SetValue(g_Config.bCopyEFBScaled);
- m_Anaglyph->SetValue(g_Config.bAnaglyphStereo);
- m_PixelLighting->SetValue(g_Config.bEnablePixelLigting);
- m_AnaglyphSeparation->SetValue(g_Config.iAnaglyphStereoSeparation);
- m_AnaglyphFocalAngle->SetValue(g_Config.iAnaglyphFocalAngle);
- //Advance
- m_DisableFog->SetValue(g_Config.bDisableFog);
- m_OverlayFPS->SetValue(g_Config.bShowFPS);
-
- m_CopyEFB->SetValue(!g_Config.bEFBCopyDisable);
- g_Config.bCopyEFBToTexture ? m_Radio_CopyEFBToGL->SetValue(true) : m_Radio_CopyEFBToRAM->SetValue(true);
- m_EnableHotkeys->SetValue(g_Config.bOSDHotKey);
- m_WireFrame->SetValue(g_Config.bWireFrame);
- m_EnableXFB->SetValue(g_Config.bUseXFB);
- m_EnableRealXFB->SetValue(g_Config.bUseRealXFB);
- m_UseNativeMips->SetValue(g_Config.bUseNativeMips);
- m_Enable3dVision->SetValue(g_Config.b3DVision);
-
- m_DumpTextures->SetValue(g_Config.bDumpTextures);
- m_DumpFrames->SetValue(g_Config.bDumpFrames);
- m_OverlayStats->SetValue(g_Config.bOverlayStats);
- m_ProjStats->SetValue(g_Config.bOverlayProjStats);
- m_ShaderErrors->SetValue(g_Config.bShowShaderErrors);
- m_TexfmtOverlay->SetValue(g_Config.bTexFmtOverlayEnable);
- m_TexfmtCenter->SetValue(g_Config.bTexFmtOverlayCenter);
- m_TexfmtCenter->Enable(m_TexfmtOverlay->IsChecked());
-}
-
-void GFXConfigDialogDX::CreateGUIControls()
-{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
- this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-
- wxBoxSizer* sMain;
- sMain = new wxBoxSizer( wxVERTICAL );
-
- m_Notebook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 );
- m_PageDirect3D = new wxPanel( m_Notebook, ID_DIRERCT3D, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_PageEnhancements = new wxPanel( m_Notebook, ID_PAGEENHANCEMENTS, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_PageAdvanced = new wxPanel( m_Notebook, ID_PAGEADVANCED, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-
- //D3D Tab
- wxStaticBoxSizer* sbBasic;
- sbBasic = new wxStaticBoxSizer( new wxStaticBox( m_PageDirect3D, wxID_ANY, wxT("Basic") ), wxVERTICAL );
- m_AdapterText = new wxStaticText( m_PageDirect3D, wxID_ANY, wxT("Adapter:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_AdapterText->Wrap( -1 );
-
- wxArrayString arrayStringFor_AdapterCB;
- for (int i = 0; i < D3D::GetNumAdapters(); ++i)
- {
- const D3D::Adapter &adapter = D3D::GetAdapter(i);
- arrayStringFor_AdapterCB.Add(wxString::FromAscii(adapter.ident.Description));
- }
- const D3D::Adapter &adapter = D3D::GetAdapter(g_Config.iAdapter);
-
- m_AdapterCB = new wxChoice( m_PageDirect3D, ID_ADAPTER, wxDefaultPosition, wxDefaultSize, arrayStringFor_AdapterCB, 0);
- m_VSync = new wxCheckBox( m_PageDirect3D, ID_VSYNC, wxT("V-sync"), wxPoint( -1,-1 ), wxDefaultSize, 0 );
- m_WidescreenHack = new wxCheckBox( m_PageDirect3D, ID_WIDESCREEN_HACK, wxT("Widescreen hack"), wxPoint( -1,-1 ), wxDefaultSize, 0 );
-
- m_staticARText = new wxStaticText( m_PageDirect3D, wxID_ANY, wxT("Aspect ratio:"), wxPoint( -1,-1 ), wxDefaultSize, 0 );
- m_staticARText->Wrap( -1 );
- wxString m_KeepARChoices[] = { wxT("Auto"), wxT("Force 16:9 (widescreen)"), wxT("Force 4:3 (standard)"), wxT("Stretch to window") };
- int m_KeepARNChoices = sizeof( m_KeepARChoices ) / sizeof( wxString );
- m_KeepAR = new wxChoice( m_PageDirect3D, ID_ASPECT, wxPoint( -1,-1 ), wxDefaultSize, m_KeepARNChoices, m_KeepARChoices, 0 );
- m_KeepAR->SetSelection( 0 );
-
- m_staticMSAAText = new wxStaticText( m_PageDirect3D, wxID_ANY, wxT("SSAA mode:"), wxPoint( -1,-1 ), wxDefaultSize, 0 );
- m_staticMSAAText->Wrap( -1 );
- wxArrayString arrayStringFor_MSAAModeCB;
- for (int i = 0; i < (int)adapter.aa_levels.size(); i++)
- {
- arrayStringFor_MSAAModeCB.Add(wxString::FromAscii(adapter.aa_levels[i].name));
- }
- m_MSAAModeCB = new wxChoice( m_PageDirect3D, ID_ANTIALIASMODE, wxPoint( -1,-1 ), wxDefaultSize, arrayStringFor_MSAAModeCB, 0);
- m_EFBScaleText = new wxStaticText( m_PageDirect3D, wxID_ANY, wxT("Internal Resolution:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_EFBScaleText->Wrap( -1 );
- wxString m_EFBScaleModeChoices[] = { wxT("Auto (fractional)"), wxT("Auto (integral)"), wxT("Native"), wxT("2x"), wxT("3x") };
- int m_EFBScaleModeNChoices = sizeof( m_EFBScaleModeChoices ) / sizeof( wxString );
- m_EFBScaleMode = new wxChoice( m_PageDirect3D, ID_EFBSCALEMODE, wxDefaultPosition, wxDefaultSize, m_EFBScaleModeNChoices, m_EFBScaleModeChoices, 0 );
-
- m_EnableEFBAccess = new wxCheckBox( m_PageDirect3D, ID_EFB_ACCESS_ENABLE, wxT("Enable CPU->EFB access"), wxDefaultPosition, wxDefaultSize, 0 );
-
- wxStaticBoxSizer* sbSTC;
- sbSTC = new wxStaticBoxSizer( new wxStaticBox( m_PageDirect3D, wxID_ANY, wxT("Safe texture cache") ), wxVERTICAL );
- m_SafeTextureCache = new wxCheckBox( m_PageDirect3D, ID_SAFETEXTURECACHE, wxT("Use safe texture cache"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Radio_SafeTextureCache_Safe = new wxRadioButton( m_PageDirect3D, ID_RADIO_SAFETEXTURECACHE_SAFE, wxT("safe"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Radio_SafeTextureCache_Normal = new wxRadioButton( m_PageDirect3D, ID_RADIO_SAFETEXTURECACHE_NORMAL, wxT("normal"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Radio_SafeTextureCache_Fast = new wxRadioButton( m_PageDirect3D, ID_RADIO_SAFETEXTURECACHE_FAST, wxT("fast"), wxDefaultPosition, wxDefaultSize, 0 );
- m_DlistCaching = new wxCheckBox( m_PageDirect3D, ID_DLISTCACHING, wxT("Use DList Caching"), wxDefaultPosition, wxDefaultSize, 0 );
- // Sizers
- wxGridBagSizer* sBasic;
- wxBoxSizer* sGeneral;
-
- sGeneral = new wxBoxSizer( wxVERTICAL );
- sBasic = new wxGridBagSizer( 0, 0 );
- sBasic->SetFlexibleDirection( wxBOTH );
- sBasic->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sBasic->Add( m_AdapterText, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sBasic->Add( m_AdapterCB, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 );
- sBasic->Add( m_VSync, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- sBasic->Add( m_WidescreenHack, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sBasic->Add( m_staticARText, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- sBasic->Add( m_KeepAR, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sBasic->Add( m_staticMSAAText, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- sBasic->Add( m_MSAAModeCB, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALL, 5 );
- sBasic->Add( m_EFBScaleText, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sBasic->Add( m_EFBScaleMode, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sBasic->Add( m_EnableEFBAccess, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sBasic->Add( m_DlistCaching, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbBasic->Add( sBasic, 0, 0, 5 );
- sGeneral->Add( sbBasic, 0, wxEXPAND|wxALL, 5 );
-
- wxGridBagSizer* sSTC;
- sSTC = new wxGridBagSizer( 0, 0 );
- sSTC->SetFlexibleDirection( wxBOTH );
- sSTC->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sSTC->Add( m_SafeTextureCache, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sSTC->Add( 0, 0, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
- sSTC->Add( m_Radio_SafeTextureCache_Safe, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sSTC->Add( m_Radio_SafeTextureCache_Normal, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sSTC->Add( m_Radio_SafeTextureCache_Fast, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbSTC->Add( sSTC, 0, wxEXPAND, 5 );
- sGeneral->Add( sbSTC, 0, wxEXPAND|wxALL, 5 );
-
- m_PageDirect3D->SetSizer( sGeneral );
- m_PageDirect3D->Layout();
- sGeneral->Fit( m_PageDirect3D );
- m_Notebook->AddPage( m_PageDirect3D, wxT("General"), true );
-
- //Enhancements Tab
- wxStaticBoxSizer* sbTextureFilter;
- sbTextureFilter = new wxStaticBoxSizer( new wxStaticBox( m_PageEnhancements, wxID_ANY, wxT("Texture filtering") ), wxVERTICAL );
- m_ForceFiltering = new wxCheckBox( m_PageEnhancements, ID_FORCEFILTERING, wxT("Force bi/trilinear filtering (breaks video in several Wii games)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_MaxAnisotropy = new wxCheckBox( m_PageEnhancements, ID_FORCEANISOTROPY, wxT("16x anisotropic filtering"), wxDefaultPosition, wxDefaultSize, 0 );
- m_HiresTextures = new wxCheckBox( m_PageEnhancements, ID_LOADHIRESTEXTURES, wxT("Hires texture loading"), wxDefaultPosition, wxDefaultSize, 0 );
-
- wxStaticBoxSizer* sbEFBHacks;
- sbEFBHacks = new wxStaticBoxSizer( new wxStaticBox( m_PageEnhancements, wxID_ANY, wxT("EFB hacks") ), wxVERTICAL );
- m_EFBScaledCopy = new wxCheckBox( m_PageEnhancements, ID_EFBSCALEDCOPY, wxT("EFB scaled copy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Enable3dVision = new wxCheckBox( m_PageEnhancements, ID_ENABLE_3DVISION, wxT("NVIDIA 3D Vision support (Note: fullscreen must be enabled)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_PixelLighting = new wxCheckBox( m_PageEnhancements, ID_PIXELLIGHTING, wxT("Pixel Lighting"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Anaglyph = new wxCheckBox( m_PageEnhancements, ID_ANAGLYPH, wxT("Anaglyph Stereo"), wxDefaultPosition, wxDefaultSize, 0 );
- m_AnaglyphSeparation = new wxSlider( m_PageEnhancements, ID_ANAGLYPHSEPARATION,2000,1,10000, wxDefaultPosition, wxDefaultSize, wxHORIZONTAL,wxDefaultValidator, wxT("Stereo separation") );
- m_AnaglyphFocalAngle = new wxSlider( m_PageEnhancements, ID_ANAGLYPHFOCALANGLE,0,-1000,1000, wxDefaultPosition, wxDefaultSize, wxHORIZONTAL,wxDefaultValidator, wxT("Stereo Focal Angle") );
- m_AnaglyphSeparationText = new wxStaticText( m_PageEnhancements, wxID_ANY, wxT("Stereo Separation:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_AnaglyphFocalAngleText= new wxStaticText( m_PageEnhancements, wxID_ANY, wxT("Focal Angle:"), wxDefaultPosition, wxDefaultSize, 0 );
-
- // Sizers
- wxBoxSizer* sEnhancements;
- wxGridBagSizer* sTextureFilter;
- sEnhancements = new wxBoxSizer( wxVERTICAL );
- sTextureFilter = new wxGridBagSizer( 0, 0 );
- sTextureFilter->SetFlexibleDirection( wxBOTH );
- sTextureFilter->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sTextureFilter->Add( m_ForceFiltering, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sTextureFilter->Add( m_MaxAnisotropy, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sTextureFilter->Add( m_HiresTextures, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbTextureFilter->Add( sTextureFilter, 0, wxEXPAND, 5 );
- sEnhancements->Add( sbTextureFilter, 0, wxEXPAND|wxALL, 5 );
-
- wxGridBagSizer* sEFBHacks;
- sEFBHacks = new wxGridBagSizer( 0, 0 );
- sEFBHacks->SetFlexibleDirection( wxBOTH );
- sEFBHacks->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sEFBHacks->Add( m_EFBScaledCopy, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbEFBHacks->Add( sEFBHacks, 1, wxEXPAND, 5 );
- sEnhancements->Add( sbEFBHacks, 0, wxEXPAND|wxALL, 5 );
-
- wxStaticBoxSizer* sbImprovements;
- sbImprovements = new wxStaticBoxSizer( new wxStaticBox( m_PageEnhancements, wxID_ANY, wxT("Improvements") ), wxVERTICAL );
- wxGridBagSizer* sImprovements;
- sImprovements = new wxGridBagSizer( 0, 0 );
- sImprovements->SetFlexibleDirection( wxBOTH );
- sImprovements->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sImprovements->Add( m_Enable3dVision, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
- sImprovements->Add( m_Anaglyph, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sImprovements->Add( m_AnaglyphSeparationText, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sImprovements->Add( m_AnaglyphFocalAngleText, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sImprovements->Add( m_AnaglyphSeparation, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sImprovements->Add( m_AnaglyphFocalAngle, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sImprovements->Add( m_PixelLighting, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbImprovements->Add( sImprovements, 1, wxEXPAND, 5 );
- sEnhancements->Add( sbImprovements, 0, wxEXPAND|wxALL, 5 );
-
- m_PageEnhancements->SetSizer( sEnhancements );
- m_PageEnhancements->Layout();
- sEnhancements->Fit( m_PageEnhancements );
- m_Notebook->AddPage( m_PageEnhancements, wxT("Enhancements"), false );
-
- //Advanced Tab
- wxStaticBoxSizer* sbSettings;
- sbSettings = new wxStaticBoxSizer( new wxStaticBox( m_PageAdvanced, wxID_ANY, wxT("Settings") ), wxVERTICAL );
- m_DisableFog = new wxCheckBox( m_PageAdvanced, ID_DISABLEFOG, wxT("Disable fog"), wxDefaultPosition, wxDefaultSize, 0 );
- m_OverlayFPS = new wxCheckBox( m_PageAdvanced, ID_OVERLAYFPS, wxT("Overlay FPS counter"), wxDefaultPosition, wxDefaultSize, 0 );
- m_CopyEFB = new wxCheckBox( m_PageAdvanced, ID_ENABLEEFBCOPY, wxT("Enable EFB copy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_EnableHotkeys = new wxCheckBox( m_PageAdvanced, ID_ENABLEHOTKEY, wxT("Enable hotkey"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Radio_CopyEFBToRAM = new wxRadioButton( m_PageAdvanced, ID_EFBTORAM, wxT("To RAM (accuracy)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Radio_CopyEFBToGL = new wxRadioButton( m_PageAdvanced, ID_EFBTOTEX, wxT("To texture (performance, resolution)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_WireFrame = new wxCheckBox( m_PageAdvanced, ID_WIREFRAME, wxT("Enable wireframe"), wxDefaultPosition, wxDefaultSize, 0 );
- m_EnableRealXFB = new wxCheckBox( m_PageAdvanced, ID_ENABLEREALXFB, wxT("Enable real XFB"), wxDefaultPosition, wxDefaultSize, 0 );
- m_EnableXFB = new wxCheckBox( m_PageAdvanced, ID_ENABLEXFB, wxT("Enable XFB"), wxDefaultPosition, wxDefaultSize, 0 );
- m_UseNativeMips = new wxCheckBox( m_PageAdvanced, ID_USENATIVEMIPS, wxT("Use native mipmaps"), wxDefaultPosition, wxDefaultSize, 0 );
-
- wxStaticBoxSizer* sbDataDumping;
- sbDataDumping = new wxStaticBoxSizer( new wxStaticBox( m_PageAdvanced, wxID_ANY, wxT("Data dumping") ), wxVERTICAL );
- m_DumpTextures = new wxCheckBox( m_PageAdvanced, ID_TEXDUMP, wxT("Dump textures"), wxDefaultPosition, wxDefaultSize, 0 );
- m_DumpFrames = new wxCheckBox( m_PageAdvanced, ID_DUMPFRAMES, wxT("Dump frames To User/Dump/Frames"), wxDefaultPosition, wxDefaultSize, 0 );
-
- wxStaticBoxSizer* sbDebuggingTools;
- sbDebuggingTools = new wxStaticBoxSizer( new wxStaticBox( m_PageAdvanced, wxID_ANY, wxT("Debugging tools") ), wxVERTICAL );
- m_OverlayStats = new wxCheckBox( m_PageAdvanced, ID_OVERLAYSTATS, wxT("Overlay some statistics"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ShaderErrors = new wxCheckBox( m_PageAdvanced, ID_SHADERERRORS, wxT("Show shader compilation errors"), wxDefaultPosition, wxDefaultSize, 0 );
- m_TexfmtOverlay = new wxCheckBox( m_PageAdvanced, ID_TEXFMT_OVERLAY, wxT("Enable texture format overlay"), wxDefaultPosition, wxDefaultSize, 0 );
- m_TexfmtCenter = new wxCheckBox( m_PageAdvanced, ID_TEXFMT_CENTER, wxT("Centered"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ProjStats = new wxCheckBox( m_PageAdvanced, wxID_ANY, wxT("Overlay projection stats"), wxDefaultPosition, wxDefaultSize, 0 );
-
- // Sizers
- wxBoxSizer* sAdvanced;
- sAdvanced = new wxBoxSizer( wxVERTICAL );
-
- wxGridBagSizer* sSettings;
- sSettings = new wxGridBagSizer( 0, 0 );
- sSettings->SetFlexibleDirection( wxBOTH );
- sSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sSettings->Add( m_DisableFog, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sSettings->Add( m_OverlayFPS, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 20 );
- sSettings->Add( m_CopyEFB, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sSettings->Add( m_EnableHotkeys, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 20 );
- sSettings->Add( m_Radio_CopyEFBToRAM, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
- sSettings->Add( m_Radio_CopyEFBToGL, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 10 );
- sSettings->Add( m_WireFrame, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 20 );
- sSettings->Add( m_EnableRealXFB, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 20 );
- sSettings->Add( m_EnableXFB, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sSettings->Add( m_UseNativeMips, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbSettings->Add( sSettings, 0, wxEXPAND, 5 );
- sAdvanced->Add( sbSettings, 0, wxEXPAND|wxALL, 5 );
-
- wxGridBagSizer* sDataDumping;
- sDataDumping = new wxGridBagSizer( 0, 0 );
- sDataDumping->SetFlexibleDirection( wxBOTH );
- sDataDumping->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sDataDumping->Add( m_DumpTextures, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sDataDumping->Add( m_DumpFrames, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbDataDumping->Add( sDataDumping, 0, wxEXPAND, 5 );
- sAdvanced->Add( sbDataDumping, 0, wxEXPAND|wxALL, 5 );
-
- wxGridBagSizer* sDebuggingTools;
- sDebuggingTools = new wxGridBagSizer( 0, 0 );
- sDebuggingTools->SetFlexibleDirection( wxBOTH );
- sDebuggingTools->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- sDebuggingTools->Add( m_OverlayStats, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sDebuggingTools->Add( m_ShaderErrors, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sDebuggingTools->Add( m_TexfmtOverlay, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sDebuggingTools->Add( m_TexfmtCenter, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sDebuggingTools->Add( m_ProjStats, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
- sbDebuggingTools->Add( sDebuggingTools, 0, wxEXPAND, 5 );
- sAdvanced->Add( sbDebuggingTools, 0, wxEXPAND|wxALL, 5 );
-
- m_PageAdvanced->SetSizer( sAdvanced );
- m_PageAdvanced->Layout();
- sAdvanced->Fit( m_PageAdvanced );
- m_Notebook->AddPage( m_PageAdvanced, wxT("Advanced"), false );
-
- sMain->Add( m_Notebook, 1, wxALL|wxEXPAND, 5 );
-
- //Buttons
- wxBoxSizer* sButtons;
- sButtons = new wxBoxSizer( wxVERTICAL );
- m_Close = new wxButton( this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
- sButtons->Add( m_Close, 0, wxALL|wxEXPAND, 5 );
- sMain->Add( sButtons, 0, wxALIGN_RIGHT, 5 );
-
- this->SetSizer( sMain );
- this->Layout();
-
- InitializeGUIValues();
-
- Fit();
- Center();
- UpdateGUI();
-}
-
-void GFXConfigDialogDX::DirectXSettingsChanged(wxCommandEvent& event)
-{
- switch (event.GetId())
- {
- case ID_ADAPTER:
- g_Config.iAdapter = m_AdapterCB->GetSelection();
- break;
- case ID_VSYNC:
- g_Config.bVSync = m_VSync->IsChecked();
- break;
- case ID_WIDESCREEN_HACK:
- g_Config.bWidescreenHack = m_WidescreenHack->IsChecked();
- break;
- case ID_ASPECT:
- g_Config.iAspectRatio = m_KeepAR->GetSelection();
- break;
- case ID_ANTIALIASMODE:
- g_Config.iMultisampleMode = m_MSAAModeCB->GetSelection();
- break;
- case ID_EFBSCALEMODE:
- g_Config.iEFBScale = m_EFBScaleMode->GetSelection();
- break;
- case ID_EFB_ACCESS_ENABLE:
- g_Config.bEFBAccessEnable = m_EnableEFBAccess->IsChecked();
- break;
- case ID_SAFETEXTURECACHE:
- g_Config.bSafeTextureCache = m_SafeTextureCache->IsChecked();
- break;
- case ID_DLISTCACHING:
- g_Config.bDlistCachingEnable = m_DlistCaching->IsChecked();
- break;
- case ID_RADIO_SAFETEXTURECACHE_SAFE:
- g_Config.iSafeTextureCache_ColorSamples = 0;
- break;
- case ID_RADIO_SAFETEXTURECACHE_NORMAL:
- if(g_Config.iSafeTextureCache_ColorSamples < 512)
- g_Config.iSafeTextureCache_ColorSamples = 512;
- break;
- case ID_RADIO_SAFETEXTURECACHE_FAST:
- if(g_Config.iSafeTextureCache_ColorSamples > 128 || g_Config.iSafeTextureCache_ColorSamples == 0)
- g_Config.iSafeTextureCache_ColorSamples = 128;
- break;
- }
- UpdateGUI();
-}
-
-void GFXConfigDialogDX::EnhancementsSettingsChanged(wxCommandEvent& event)
-{
- switch (event.GetId())
- {
- case ID_FORCEFILTERING:
- g_Config.bForceFiltering = m_ForceFiltering->IsChecked();
- break;
- case ID_FORCEANISOTROPY:
- g_Config.iMaxAnisotropy = m_MaxAnisotropy->IsChecked() ? 8 : 1;
- break;
- case ID_LOADHIRESTEXTURES:
- g_Config.bHiresTextures = m_HiresTextures->IsChecked();
- break;
- case ID_EFBSCALEDCOPY:
- g_Config.bCopyEFBScaled = m_EFBScaledCopy->IsChecked();
- break;
- case ID_PIXELLIGHTING:
- g_Config.bEnablePixelLigting = m_PixelLighting->IsChecked();
- break;
- case ID_ANAGLYPH:
- g_Config.bAnaglyphStereo = m_Anaglyph->IsChecked();
- break;
- case ID_ANAGLYPHSEPARATION:
- g_Config.iAnaglyphStereoSeparation = m_AnaglyphSeparation->GetValue();
- break;
- case ID_ANAGLYPHFOCALANGLE:
- g_Config.iAnaglyphFocalAngle = m_AnaglyphFocalAngle->GetValue();
- break;
- }
- UpdateGUI();
-}
-
-void GFXConfigDialogDX::AdvancedSettingsChanged(wxCommandEvent& event)
-{
- switch (event.GetId())
- {
- case ID_DISABLEFOG:
- g_Config.bDisableFog = m_DisableFog->IsChecked();
- break;
- case ID_OVERLAYFPS:
- g_Config.bShowFPS = m_OverlayFPS->IsChecked();
- break;
- case ID_ENABLEEFBCOPY:
- g_Config.bEFBCopyDisable = !m_CopyEFB->IsChecked();
- break;
- case ID_EFBTORAM:
- g_Config.bCopyEFBToTexture = false;
- break;
- case ID_EFBTOTEX:
- g_Config.bCopyEFBToTexture = true;
- break;
- case ID_ENABLEHOTKEY:
- g_Config.bOSDHotKey = m_EnableHotkeys->IsChecked();
- break;
- case ID_WIREFRAME:
- g_Config.bWireFrame = m_WireFrame->IsChecked();
- break;
- case ID_ENABLEXFB:
- g_Config.bUseXFB = m_EnableXFB->IsChecked();
- break;
- case ID_ENABLEREALXFB:
- g_Config.bUseRealXFB = m_EnableRealXFB->IsChecked();
- break;
- case ID_USENATIVEMIPS:
- g_Config.bUseNativeMips = m_UseNativeMips->IsChecked();
- break;
- case ID_TEXDUMP:
- g_Config.bDumpTextures = m_DumpTextures->IsChecked();
- break;
- case ID_DUMPFRAMES:
- g_Config.bDumpFrames = m_DumpFrames->IsChecked();
- break;
- case ID_OVERLAYSTATS:
- g_Config.bOverlayStats = m_OverlayStats->IsChecked();
- break;
- case ID_PROJSTATS:
- g_Config.bOverlayProjStats = m_ProjStats->IsChecked();
- break;
- case ID_SHADERERRORS:
- g_Config.bShowShaderErrors = m_ShaderErrors->IsChecked();
- break;
- case ID_TEXFMT_OVERLAY:
- g_Config.bTexFmtOverlayEnable = m_TexfmtOverlay->IsChecked();
- break;
- case ID_TEXFMT_CENTER:
- g_Config.bTexFmtOverlayCenter = m_TexfmtCenter->IsChecked();
- break;
- case ID_ENABLE_3DVISION:
- g_Config.b3DVision = m_Enable3dVision->IsChecked();
- break;
- }
- UpdateGUI();
-}
-
-void GFXConfigDialogDX::CloseWindow()
-{
- // Save the config to INI
- g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
- EndModal(1);
-}
-
-void GFXConfigDialogDX::UpdateGUI()
-{
- if (g_Config.bUseRealXFB)
- {
- // must use XFB to use real XFB
- g_Config.bUseXFB = true;
- m_EnableXFB->SetValue(true);
- }
- m_EnableXFB->Enable(!g_Config.bUseRealXFB);
- m_TexfmtCenter->Enable(g_Config.bTexFmtOverlayEnable);
-
- // Disable the Copy to options when EFBCopy is disabled
- m_Radio_CopyEFBToRAM->Enable(!g_Config.bEFBCopyDisable);
- m_Radio_CopyEFBToGL->Enable(!g_Config.bEFBCopyDisable);
-
- // Disable/Enable Safe Texture Cache options
- m_Radio_SafeTextureCache_Safe->Enable(g_Config.bSafeTextureCache);
- m_Radio_SafeTextureCache_Normal->Enable(g_Config.bSafeTextureCache);
- m_Radio_SafeTextureCache_Fast->Enable(g_Config.bSafeTextureCache);
-}
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h
deleted file mode 100644
index 0e5946e9de..0000000000
--- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// 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 _DX_DLGSETTINGS_H_
-#define _DX_DLGSETTINGS_H_
-
-#include <wx/wx.h>
-#include <wx/dialog.h>
-#include <wx/textctrl.h>
-#include <wx/button.h>
-#include <wx/stattext.h>
-#include <wx/choice.h>
-#include <wx/combobox.h>
-#include <wx/checkbox.h>
-#include <wx/notebook.h>
-#include <wx/panel.h>
-#include <wx/filepicker.h>
-#include <wx/gbsizer.h>
-
-class GFXConfigDialogDX : public wxDialog
-{
- public:
- GFXConfigDialogDX(wxWindow *parent, wxWindowID id = 1,
-#ifdef DEBUGFAST
- const wxString &title = wxT("DX9 (DEBUGFAST) Plugin Configuration"),
-#else
-#ifndef _DEBUG
- const wxString &title = wxT("DX9 Plugin Configuration"),
-#else
- const wxString &title = wxT("DX9 (DEBUG) Plugin Configuration"),
-#endif
-#endif
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_DIALOG_STYLE);
- virtual ~GFXConfigDialogDX();
- void CreateGUIControls();
- void CloseClick(wxCommandEvent& WXUNUSED (event));
-
- private:
- DECLARE_EVENT_TABLE();
-
- wxBoxSizer* sGeneral;
- wxStaticBoxSizer* sbBasic;
- wxGridBagSizer* sBasic;
- wxStaticBoxSizer* sbSTC;
- wxGridBagSizer* sSTC;
-
- wxBoxSizer* sEnhancements;
- wxStaticBoxSizer* sbTextureFilter;
- wxGridBagSizer* sTextureFilter;
- wxStaticBoxSizer* sbEFBHacks;
- wxGridBagSizer* sEFBHacks;
-
- wxBoxSizer* sAdvanced;
- wxStaticBoxSizer* sbSettings;
- wxGridBagSizer* sSettings;
- wxStaticBoxSizer* sbDataDumping;
- wxGridBagSizer* sDataDumping;
- wxStaticBoxSizer* sbDebuggingTools;
- wxGridBagSizer* sDebuggingTools;
-
-
- wxButton *m_Close;
-
- wxNotebook *m_Notebook;
- wxPanel *m_PageDirect3D;
- wxPanel *m_PageEnhancements;
- wxPanel *m_PageAdvanced;
-
- //Direct3D Tab
- wxStaticText* m_AdapterText;
- wxChoice *m_AdapterCB;
- wxArrayString arrayStringFor_AdapterCB;
- wxArrayString arrayStringFor_MSAAModeCB;
- wxCheckBox *m_VSync;
- wxCheckBox *m_WidescreenHack;
- wxStaticText* m_staticARText;
- wxChoice *m_KeepAR;
- wxStaticText* m_staticMSAAText;
- wxChoice *m_MSAAModeCB;
- wxStaticText* m_EFBScaleText;
- wxChoice *m_EFBScaleMode;
- wxCheckBox *m_EnableEFBAccess;
- wxCheckBox *m_SafeTextureCache;
- wxRadioButton *m_Radio_SafeTextureCache_Fast;
- wxRadioButton *m_Radio_SafeTextureCache_Normal;
- wxRadioButton *m_Radio_SafeTextureCache_Safe;
- wxCheckBox *m_DlistCaching;
- //Enhancements Tab
- wxCheckBox *m_ForceFiltering;
- wxCheckBox *m_MaxAnisotropy;
- wxCheckBox *m_HiresTextures;
- wxCheckBox *m_EFBScaledCopy;
- wxCheckBox *m_Anaglyph;
- wxCheckBox *m_PixelLighting;
- wxStaticText* m_AnaglyphSeparationText;
- wxSlider *m_AnaglyphSeparation;
- wxStaticText* m_AnaglyphFocalAngleText;
- wxSlider *m_AnaglyphFocalAngle;
- //Advanced Tab
- wxCheckBox *m_DisableFog;
- wxCheckBox *m_OverlayFPS;
- wxCheckBox *m_CopyEFB;
- wxRadioButton *m_Radio_CopyEFBToRAM;
- wxRadioButton *m_Radio_CopyEFBToGL;
- wxCheckBox *m_EnableHotkeys;
- wxCheckBox *m_WireFrame;
- wxCheckBox *m_EnableXFB;
- wxCheckBox *m_EnableRealXFB;
- wxCheckBox *m_UseNativeMips;
- wxCheckBox *m_DumpTextures;
- wxCheckBox *m_DumpFrames;
- wxCheckBox *m_OverlayStats;
- wxCheckBox *m_ProjStats;
- wxCheckBox *m_ShaderErrors;
- wxCheckBox *m_TexfmtOverlay;
- wxCheckBox *m_TexfmtCenter;
- wxCheckBox *m_Enable3dVision;
-
- enum
- {
- ID_CLOSE,
- ID_ADAPTER,
- ID_VSYNC,
- ID_WIDESCREEN_HACK,
- ID_ASPECT,
- ID_FULLSCREENRESOLUTION,
- ID_ANTIALIASMODE,
- ID_EFBSCALEMODE,
- ID_EFB_ACCESS_ENABLE,
- ID_SAFETEXTURECACHE,
- ID_RADIO_SAFETEXTURECACHE_SAFE,
- ID_RADIO_SAFETEXTURECACHE_NORMAL,
- ID_RADIO_SAFETEXTURECACHE_FAST,
- ID_DLISTCACHING,
- ID_FORCEFILTERING,
- ID_FORCEANISOTROPY,
- ID_LOADHIRESTEXTURES,
- ID_EFBSCALEDCOPY,
- ID_DISABLEFOG,
- ID_OVERLAYFPS,
- ID_ENABLEEFBCOPY,
- ID_EFBTORAM,
- ID_EFBTOTEX,
- ID_ENABLEHOTKEY,
- ID_WIREFRAME,
- ID_ENABLEXFB,
- ID_ENABLEREALXFB,
- ID_USENATIVEMIPS,
- ID_TEXDUMP,
- ID_DUMPFRAMES,
- ID_OVERLAYSTATS,
- ID_PROJSTATS,
- ID_SHADERERRORS,
- ID_TEXFMT_OVERLAY,
- ID_TEXFMT_CENTER,
- ID_DEBUGSTEP,
- ID_REGISTERS,
- ID_ENABLEDEBUGGING,
- ID_REGISTERSELECT,
- ID_ARTEXT,
- ID_NOTEBOOK = 1000,
- ID_DEBUGGER,
- ID_ABOUT,
- ID_DIRERCT3D,
- ID_PAGEENHANCEMENTS,
- ID_PAGEADVANCED,
- ID_PIXELLIGHTING,
- ID_ANAGLYPH,
- ID_ANAGLYPHSEPARATION,
- ID_ANAGLYPHFOCALANGLE,
- ID_ENABLE_3DVISION,
- };
- void InitializeAdapters();
- void OnClose(wxCloseEvent& event);
- void InitializeGUIValues();
- void DirectXSettingsChanged(wxCommandEvent& event);
- void EnhancementsSettingsChanged(wxCommandEvent& event);
- void AdvancedSettingsChanged(wxCommandEvent& event);
- void CloseWindow();
- void UpdateGUI();
-
-};
-#endif //_DX_DLGSETTINGS_H_
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
index bee4f86c7e..7c60540832 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
@@ -22,8 +22,7 @@
#include "debugger/debugger.h"
#if defined(HAVE_WX) && HAVE_WX
-#include "DlgSettings.h"
-GFXConfigDialogDX *m_ConfigFrame = NULL;
+#include "VideoConfigDiag.h"
#endif // HAVE_WX
#if defined(HAVE_WX) && HAVE_WX
@@ -45,7 +44,6 @@ GFXConfigDialogDX *m_ConfigFrame = NULL;
#include "CommandProcessor.h"
#include "PixelEngine.h"
#include "OnScreenDisplay.h"
-#include "DlgSettings.h"
#include "D3DTexture.h"
#include "D3DUtil.h"
#include "EmuWindow.h"
@@ -181,12 +179,28 @@ void DllConfig(void *_hParent)
g_Config.GameIniLoad(globals->game_ini);
UpdateActiveConfig();
#if defined(HAVE_WX) && HAVE_WX
- m_ConfigFrame = new GFXConfigDialogDX((wxWindow *)_hParent);
- m_ConfigFrame->CreateGUIControls();
- m_ConfigFrame->ShowModal();
- m_ConfigFrame->Destroy();
+ // adapters
+ std::vector<std::string> adapters;
+ for (int i = 0; i < D3D::GetNumAdapters(); ++i)
+ adapters.push_back(D3D::GetAdapter(i).ident.Description);
+
+ // aamodes
+ std::vector<std::string> aamodes;
+ if (g_Config.iAdapter < D3D::GetNumAdapters())
+ {
+ const D3D::Adapter &adapter = D3D::GetAdapter(g_Config.iAdapter);
+
+ for (int i = 0; i < adapter.aa_levels.size(); ++i)
+ aamodes.push_back(adapter.aa_levels[i].name);
+ }
+
+ VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, "Direct3D9", adapters, aamodes);
+ diag->ShowModal();
+ diag->Destroy();
#endif
+ g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
+
if (!s_PluginInitialized)
D3D::Shutdown();
}
diff --git a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt
index a87becf5f2..04fed2551a 100644
--- a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt
+++ b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt
@@ -21,7 +21,6 @@ set(LIBS videocommon
if(wxWidgets_FOUND)
set(SRCS ${SRCS}
- Src/GUI/ConfigDlg.cpp
Src/Debugger/Debugger.cpp)
endif(wxWidgets_FOUND)
diff --git a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj
index ee336ced66..9473bc8e3e 100644
--- a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj
+++ b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj
@@ -57,7 +57,7 @@
EnableIntrinsicFunctions="true"
OmitFramePointers="true"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
+ AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
RuntimeLibrary="0"
@@ -165,7 +165,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
+ AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
ExceptionHandling="1"
@@ -270,7 +270,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
+ AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
PreprocessorDefinitions="_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -368,7 +368,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
+ AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -472,7 +472,7 @@
EnableIntrinsicFunctions="true"
OmitFramePointers="true"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
+ AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;DEBUGFAST"
StringPooling="true"
RuntimeLibrary="0"
@@ -581,7 +581,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
+ AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;DEBUGFAST"
StringPooling="true"
ExceptionHandling="1"
@@ -783,66 +783,6 @@
</File>
</Filter>
<Filter
- Name="GUI"
- >
- <File
- RelativePath=".\Src\GUI\ConfigDlg.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DebugFast|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DebugFast|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Src\GUI\ConfigDlg.h"
- >
- </File>
- </Filter>
- <Filter
Name="Debugger"
>
<File
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
deleted file mode 100644
index 71d979058a..0000000000
--- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
+++ /dev/null
@@ -1,785 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// 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/
-
-#include <wx/wx.h>
-#include <wx/sizer.h>
-#include <wx/filepicker.h>
-#include <wx/gbsizer.h>
-#include <wx/notebook.h>
-#include <wx/mimetype.h>
-
-#include "ConfigDlg.h"
-#include "../Globals.h"
-#include "VideoConfig.h"
-#include "../TextureCache.h"
-#include "VertexShaderManager.h"
-#include "../PostProcessing.h"
-#include "Render.h"
-
-#include "FileUtil.h"
-
-BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog)
- EVT_CLOSE(GFXConfigDialogOGL::OnClose)
- EVT_BUTTON(wxID_CLOSE, GFXConfigDialogOGL::CloseClick)
- EVT_BUTTON(wxID_ABOUT, GFXConfigDialogOGL::AboutClick)
- EVT_CHECKBOX(ID_VSYNC, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHOICE(ID_MAXANISOTROPY, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHOICE(ID_MSAAMODECB, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHOICE(ID_EFBSCALEMODE, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_USEXFB, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_USEREALXFB, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_FORCEFILTERING, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_USENATIVEMIPS, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_EFBSCALEDCOPY, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_WIDESCREENHACK, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHOICE(ID_ASPECT, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_CROP, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHECKBOX(ID_WIREFRAME, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_SHOWFPS, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_STATISTICS, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_PROJSTATS, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_SHOWEFBCOPYREGIONS, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_SHADERERRORS, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_TEXFMTOVERLAY, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_TEXFMTCENTER, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DUMPTEXTURES, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_HIRESTEXTURES, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DUMPEFBTARGET, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DUMPFRAMES, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_FREELOOK, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DISABLELIGHTING, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DISABLETEXTURING, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DISABLEFOG, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_OSDHOTKEY, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_HACK, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_SAFETEXTURECACHE,GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_SAFE, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_NORMAL, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_FAST, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DSTALPHAPASS,GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_CHECKBOX_DISABLECOPYEFB, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_PIXELLIGHTING, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_COPYEFBTORAM, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_RADIOBUTTON(ID_RADIO_COPYEFBTOGL, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_DLISTCACHING, GFXConfigDialogOGL::AdvancedSettingsChanged)
- EVT_CHOICE(ID_PHACKVALUE, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_CHOICE(ID_POSTSHADER, GFXConfigDialogOGL::GeneralSettingsChanged)
- EVT_BUTTON(ID_RELOADSHADER, GFXConfigDialogOGL::ReloadShaderClick)
- EVT_BUTTON(ID_EDITSHADER, GFXConfigDialogOGL::EditShaderClick)
-END_EVENT_TABLE()
-
-GFXConfigDialogOGL::GFXConfigDialogOGL(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
-: wxDialog(parent, id, title, position, size, style)
-{
-}
-
-
-// Close and unload the window
-// ---------------
-GFXConfigDialogOGL::~GFXConfigDialogOGL()
-{
- INFO_LOG(CONSOLE, "GFXConfigDialogOGL Closed");
-}
-
-void GFXConfigDialogOGL::OnClose(wxCloseEvent& event)
-{
- //INFO_LOG(CONSOLE, "OnClose");
-
- // notice that we don't run wxEntryCleanup(); here so the dll will still be loaded
- /* JP: Yes, it seems like Close() does not do that. It only runs EndModal() or something
- similar to hide the window. And I don't understand the "Window deletion overview" on
- the wxWidgets website. Destroy() doesn't run the destructor either. However running
- wxEntryCleanup() from here crashes the process. But we can run it from CloseClick() */
- //wxEntryCleanup();
- //EndModal(0);
-
- // Allow wxWidgets to close and unload the window
- //event.Skip();
- CloseWindow();
-}
-
-void GFXConfigDialogOGL::CloseClick(wxCommandEvent& WXUNUSED (event))
-{
- //INFO_LOG(CONSOLE, "CloseClick");
-
- // If we run wxEntryCleanup() the class will be entirely deleted, and the destructor will be run
- //g_Config.Save();
- //wxEntryCleanup();
-
- //Close();
- CloseWindow();
-}
-
-
-
-// This one could be used to reload shaders while dolphin is running...
-void GFXConfigDialogOGL::LoadShaders()
-{
- arrayStringFor_PostShaderCB.Clear();
-
- arrayStringFor_PostShaderCB.Add(wxT("(off)"));
- if (File::IsDirectory(File::GetUserPath(D_SHADERS_IDX)))
- {
- File::FSTEntry entry;
- File::ScanDirectoryTree(File::GetUserPath(D_SHADERS_IDX), entry);
- for (u32 i = 0; i < entry.children.size(); i++)
- {
- std::string name = entry.children[i].virtualName.c_str();
- if (!strcasecmp(name.substr(name.size() - 4).c_str(), ".txt"))
- name = name.substr(0, name.size() - 4);
- arrayStringFor_PostShaderCB.Add(wxString::From8BitData(name.c_str()));
- }
- }
- else
- {
- File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
- }
-}
-
-void GFXConfigDialogOGL::InitializeGUILists()
-{
- // EFB Scale
- arrayStringFor_EFBScale.Add(wxT("Auto (fractional)"));
- arrayStringFor_EFBScale.Add(wxT("Auto (integral)"));
- arrayStringFor_EFBScale.Add(wxT("Native"));
- arrayStringFor_EFBScale.Add(wxT("2x"));
- arrayStringFor_EFBScale.Add(wxT("3x"));
-
- // Keep Aspect Ratio
- arrayStringFor_AspectRatio.Add(wxT("Auto Aspect (recommended)"));
- arrayStringFor_AspectRatio.Add(wxT("Force 16:9 Widescreen"));
- arrayStringFor_AspectRatio.Add(wxT("Force 4:3 Standard"));
- arrayStringFor_AspectRatio.Add(wxT("Stretch to Window"));
-
- // Antialias (MSAA)
- arrayStringFor_MSAAModeCB.Add(wxT("(off)"));
- arrayStringFor_MSAAModeCB.Add(wxT("2x"));
- arrayStringFor_MSAAModeCB.Add(wxT("4x"));
- arrayStringFor_MSAAModeCB.Add(wxT("8x"));
- arrayStringFor_MSAAModeCB.Add(wxT("8x CSAA"));
- arrayStringFor_MSAAModeCB.Add(wxT("8xQ CSAA"));
- arrayStringFor_MSAAModeCB.Add(wxT("16x CSAA"));
- arrayStringFor_MSAAModeCB.Add(wxT("16xQ CSAA"));
-
- // Anisotropic filter
- arrayStringFor_MaxAnisotropyCB.Add(wxT("1x"));
- arrayStringFor_MaxAnisotropyCB.Add(wxT("2x"));
- arrayStringFor_MaxAnisotropyCB.Add(wxT("4x"));
- arrayStringFor_MaxAnisotropyCB.Add(wxT("8x"));
- arrayStringFor_MaxAnisotropyCB.Add(wxT("16x"));
-
- // Post-processing shader
- LoadShaders();
-
- // Hacks
- arrayStringFor_PhackvalueCB.Add(wxT("None"));
- arrayStringFor_PhackvalueCB.Add(wxT("Zelda Twilight Princess Bloom hack"));
- arrayStringFor_PhackvalueCB.Add(wxT("Sonic and the Black Knight"));
- arrayStringFor_PhackvalueCB.Add(wxT("Bleach Versus Crusade"));
- arrayStringFor_PhackvalueCB.Add(wxT("Skies of Arcadia"));
- arrayStringFor_PhackvalueCB.Add(wxT("Metroid Other M"));
-}
-
-void GFXConfigDialogOGL::InitializeGUIValues()
-{
- // General Display Settings
- m_EFBScaleMode->SetSelection(g_Config.iEFBScale);
-
- m_KeepAR->SetSelection(g_Config.iAspectRatio);
- m_Crop->SetValue(g_Config.bCrop);
-
- // Advanced Display Settings
- m_OSDHotKey->SetValue(g_Config.bOSDHotKey);
- m_VSync->SetValue(g_Config.bVSync);
- m_UseXFB->SetValue(g_Config.bUseXFB);
- m_UseRealXFB->SetValue(g_Config.bUseRealXFB);
- m_WidescreenHack->SetValue(g_Config.bWidescreenHack);
- m_UseNativeMips->SetValue(g_Config.bUseNativeMips);
- m_EFBScaledCopy->SetValue(g_Config.bCopyEFBScaled);
- // Enhancements
- m_MaxAnisotropyCB->SetSelection(g_Config.iMaxAnisotropy - 1);
- m_ForceFiltering->SetValue(g_Config.bForceFiltering);
- m_MSAAModeCB->SetSelection(g_Config.iMultisampleMode);
-
- wxString shader = wxString::From8BitData(g_Config.sPostProcessingShader.c_str());
- if (shader == _(""))
- shader = wxT("(off)");
- m_PostShaderCB->SetStringSelection(shader);
-
- // Information
- m_ShowFPS->SetValue(g_Config.bShowFPS);
- //m_ShaderErrors->SetValue(g_Config.bShowShaderErrors);
- m_Statistics->SetValue(g_Config.bOverlayStats);
- m_ProjStats->SetValue(g_Config.bOverlayProjStats);
- m_ShowEFBCopyRegions->SetValue(g_Config.bShowEFBCopyRegions);
- m_TexFmtOverlay->SetValue(g_Config.bTexFmtOverlayEnable);
- m_TexFmtCenter->SetValue(g_Config.bTexFmtOverlayCenter);
- m_TexFmtCenter->Enable(m_TexFmtOverlay->IsChecked());
-
- // Render
- m_Wireframe->SetValue(g_Config.bWireFrame);
- m_DisableLighting->SetValue(g_Config.bDisableLighting);
- m_DisableTexturing->SetValue(g_Config.bDisableTexturing);
- m_DstAlphaPass->SetValue(g_Config.bDstAlphaPass);
- m_DisableFog->SetValue(g_Config.bDisableFog);
- m_DlistCaching->SetValue(g_Config.bDlistCachingEnable);
- m_CheckBox_DisableCopyEFB->SetValue(g_Config.bEFBCopyDisable);
- g_Config.bCopyEFBToTexture ? m_Radio_CopyEFBToGL->SetValue(true) : m_Radio_CopyEFBToRAM->SetValue(true);
-
- // Utility
- m_DumpTextures->SetValue(g_Config.bDumpTextures);
- m_HiresTextures->SetValue(g_Config.bHiresTextures);
- m_DumpEFBTarget->SetValue(g_Config.bDumpEFBTarget);
- m_DumpFrames->SetValue(g_Config.bDumpFrames);
- m_FreeLook->SetValue(g_Config.bFreeLook);
- m_PixelLighting->SetValue(g_Config.bEnablePixelLigting);;
-
- // Hacks controls
- m_PhackvalueCB->SetSelection(g_Config.iPhackvalue);
- m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
- if(g_Config.iSafeTextureCache_ColorSamples == 0)
- m_Radio_SafeTextureCache_Safe->SetValue(true);
- else
- if(g_Config.iSafeTextureCache_ColorSamples > 128)
- m_Radio_SafeTextureCache_Normal->SetValue(true);
- else
- m_Radio_SafeTextureCache_Fast->SetValue(true);
-
-}
-
-void GFXConfigDialogOGL::InitializeGUITooltips()
-{
- // Tool tips
- m_EFBScaleMode->SetToolTip(
- wxT("This will change the game's native resolution and stretch it to fill the")
- wxT("\nwindow instead of changing the display resolution. It")
- wxT("\nmay result in a blurrier image, but it may also give a higher")
- wxT("\nFPS if you have a slow graphics card.")
- wxT("\n\nApplies instantly during gameplay: <Yes>"));
- m_KeepAR->SetToolTip(
- wxT("This sets the aspect ratio of the image.")
- wxT("\nThe Widescreen hack may cause graphical issues in some games !")
- wxT("\n\nApplies instanty during gameplay: <Yes>"));
- m_Crop->SetToolTip(
- wxT("Crop the picture instead of creating a letterbox. It will assume that your screen")
- wxT("\nis of the 5:4 format if you have selected the 4:3 aspect ratio. It will assume")
- wxT("\nthat your screen is of the 16:10 format if you have selected the 16:9 aspect ratio.")
- wxT("\n\nApplies instanty during gameplay: <Yes>"));
- m_MSAAModeCB->SetToolTip(wxT(
- "Applies instanty during gameplay: <No>"));
- m_OSDHotKey->SetToolTip(
- wxT("Enable OSD hotkeys '3', '4', '5', '6' and '7' to easily toggle some settings."));
-
- // Enhancements
- m_ForceFiltering->SetToolTip(
- wxT("Even though it will increase the IQ, it will also break some EFB effects\n")
- wxT("such as Bink FMV in many Wii games or the goo in Mario Sunshine, so be careful :)"));
-
- // Render
- m_DstAlphaPass->SetToolTip(wxT("This renders a second time to set alpha to a constant value,")
- wxT("\nDisabling it may speed up some games, but could also cause glitches."));
- m_DisableFog->SetToolTip(wxT("This option should not require a restart."));
- m_CheckBox_DisableCopyEFB->SetToolTip(wxT("This may lead to a higher FPS in for example Zelda - TP.")
- wxT(" But it may also cause graphical errors and missing graphics."));
- m_Radio_CopyEFBToRAM->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
- m_Radio_CopyEFBToGL->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
-
- // Utility
-#ifdef _WIN32
- m_DumpFrames->SetToolTip(
- wxT("When dumping begins, you will be prompted to choose a video codec to")
- wxT(" encode the video in."));
-#else
- m_DumpFrames->SetToolTip(wxT(
- "!!WARNING!! This option dumps raw bitmaps of each frame, and will fill up"
- " your hard drive very quickly. Only turn this on if you have a named pipe"
- " set up for the dump or several gigabytes of space available."));
-#endif
- m_FreeLook->SetToolTip(
- wxT("Use WASD to move around, 0 and 9 to move faster or slower, and the")
- wxT(" left mouse button to pan the view."));
- m_PixelLighting->SetToolTip(
- wxT("Enables Pixel ligting to improve Ilumination."));
-
- // Hacks controls
- m_SafeTextureCache->SetToolTip(wxT("This is useful to prevent Metroid Prime from crashing, but can cause problems in other games.")
- wxT("\n[This option will apply immediately and does not require a restart. However it may not")
- wxT(" be entirely safe to change it midgames.]"));
- m_Radio_SafeTextureCache_Safe->SetToolTip(
- wxT("[This option will apply immediately and does not require a restart to take effect.]"));
- m_Radio_SafeTextureCache_Normal->SetToolTip(
- wxT("[This option will apply immediately and does not require a restart to take effect.]"));
- m_Radio_SafeTextureCache_Fast->SetToolTip(
- wxT("[This option will apply immediately and does not require a restart to take effect.]"));
- m_DlistCaching->SetToolTip(wxT("This will speed up things a little but still have some glitches in certain games."));
-}
-
-void GFXConfigDialogOGL::CreateGUIControls()
-{
- InitializeGUILists();
-
- // Notebook
- m_Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
- m_PageGeneral = new wxPanel(m_Notebook, ID_PAGEGENERAL, wxDefaultPosition, wxDefaultSize);
- m_Notebook->AddPage(m_PageGeneral, wxT("General"));
- m_PageAdvanced = new wxPanel(m_Notebook, ID_PAGEADVANCED, wxDefaultPosition, wxDefaultSize);
- m_Notebook->AddPage(m_PageAdvanced, wxT("Advanced"));
-
- // Buttons
- m_About = new wxButton(this, wxID_ABOUT, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
- // Put notebook and buttons in sizers
- wxBoxSizer* sButtons;
- sButtons = new wxBoxSizer(wxHORIZONTAL);
- sButtons->Add(m_About, 0, wxALL, 5);
- sButtons->AddStretchSpacer();
- sButtons->Add(m_Close, 0, wxALL, 5);
-
- wxBoxSizer* sMain;
- sMain = new wxBoxSizer(wxVERTICAL);
- sMain->Add(m_Notebook, 1, wxEXPAND|wxALL, 5);
- sMain->Add(sButtons, 0, wxEXPAND, 5);
-
- this->SetSizer(sMain);
- this->Layout();
-
- // General Display Settings
- sbBasic = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Basic Display Settings"));
- wxStaticText *IRText = new wxStaticText(m_PageGeneral, wxID_ANY, wxT("Internal Resolution:"), wxDefaultPosition, wxDefaultSize, 0);
- m_EFBScaleMode = new wxChoice(m_PageGeneral, ID_EFBSCALEMODE, wxDefaultPosition, wxDefaultSize, arrayStringFor_EFBScale);
- // Aspect ratio / positioning controls
- wxStaticText *KeepARText = new wxStaticText(m_PageGeneral, wxID_ANY, wxT("Keep aspect ratio:"), wxDefaultPosition, wxDefaultSize, 0);
- m_KeepAR = new wxChoice(m_PageGeneral, ID_ASPECT, wxDefaultPosition, wxDefaultSize, arrayStringFor_AspectRatio);
- m_Crop = new wxCheckBox(m_PageGeneral, ID_CROP, wxT("Crop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
- // Advanced Display Settings
- sbBasicAdvanced = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Advanced Display Settings"));
- m_OSDHotKey = new wxCheckBox(m_PageGeneral, ID_OSDHOTKEY, wxT("Enable Hotkeys"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-#if !defined(_WIN32) && (!defined(HAVE_X11) || !HAVE_X11)
- m_OSDHotKey->Enable(false);
-#endif
- m_VSync = new wxCheckBox(m_PageGeneral, ID_VSYNC, wxT("VSync (req. restart)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_UseXFB = new wxCheckBox(m_PageGeneral, ID_USEXFB, wxT("Use XFB"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_UseRealXFB = new wxCheckBox(m_PageGeneral, ID_USEREALXFB, wxT("Use Real XFB"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_WidescreenHack = new wxCheckBox(m_PageGeneral, ID_WIDESCREENHACK, wxT("Wide screen hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_UseNativeMips = new wxCheckBox(m_PageGeneral, ID_USENATIVEMIPS, wxT("Use Native Mips"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_EFBScaledCopy = new wxCheckBox(m_PageGeneral, ID_EFBSCALEDCOPY, wxT("EFB Scaled Copy"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
- // Enhancements
- sbEnhancements = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Enhancements"));
- wxStaticText *AnisoText = new wxStaticText(m_PageGeneral, ID_MAXANISOTROPYTEXT, wxT("Anisotropic filter:"), wxDefaultPosition, wxDefaultSize, 0);
- m_MaxAnisotropyCB = new wxChoice(m_PageGeneral, ID_MAXANISOTROPY, wxDefaultPosition, wxDefaultSize, arrayStringFor_MaxAnisotropyCB, 0, wxDefaultValidator);
- m_ForceFiltering = new wxCheckBox(m_PageGeneral, ID_FORCEFILTERING, wxT("Force Linear filter (!)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- wxStaticText *MSAAText = new wxStaticText(m_PageGeneral, ID_MSAAMODETEXT, wxT("Antialias (MSAA):"), wxDefaultPosition, wxDefaultSize, 0);
- m_MSAAModeCB = new wxChoice(m_PageGeneral, ID_MSAAMODECB, wxDefaultPosition, wxDefaultSize, arrayStringFor_MSAAModeCB, 0, wxDefaultValidator);
- wxStaticText *PostShaderText = new wxStaticText(m_PageGeneral, ID_POSTSHADERTEXT, wxT("Post-processing shader:"), wxDefaultPosition, wxDefaultSize, 0);
- m_PostShaderCB = new wxChoice(m_PageGeneral, ID_POSTSHADER, wxDefaultPosition, wxDefaultSize, arrayStringFor_PostShaderCB, 0, wxDefaultValidator);
- m_ReloadShader = new wxButton(m_PageGeneral, ID_RELOADSHADER, wxT("&Reload"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_EditShader = new wxButton(m_PageGeneral, ID_EDITSHADER, wxT("&Edit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
- // Sizers
- sGeneral = new wxBoxSizer(wxVERTICAL);
- sBasic = new wxGridBagSizer(0, 0);
-
- sBasic->Add(IRText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
- sBasic->Add(m_EFBScaleMode, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL, 5);
-
- sBasic->Add(KeepARText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
- sBasic->Add(m_KeepAR, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL, 5);
- sBasic->Add(m_Crop, wxGBPosition(1, 2), wxGBSpan(1, 1), wxALL | wxALIGN_CENTER_VERTICAL, 5);
-
- sbBasic->Add(sBasic);
- sGeneral->Add(sbBasic, 0, wxEXPAND|wxALL, 5);
-
- sBasicAdvanced = new wxGridBagSizer(0, 0);
-
- sBasicAdvanced->Add(m_OSDHotKey, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
- sBasicAdvanced->Add(m_VSync, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
- sBasicAdvanced->Add(m_UseXFB, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
- sBasicAdvanced->Add(m_UseRealXFB, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALL, 5);
- sBasicAdvanced->Add(m_WidescreenHack, wxGBPosition(4, 0), wxGBSpan(1, 2), wxALL, 5);
- sBasicAdvanced->Add(m_UseNativeMips, wxGBPosition(5, 0), wxGBSpan(1, 2), wxALL, 5);
- sBasicAdvanced->Add(m_EFBScaledCopy, wxGBPosition(6, 0), wxGBSpan(1, 2), wxALL, 5);
-
- sbBasicAdvanced->Add(sBasicAdvanced);
- sGeneral->Add(sbBasicAdvanced, 0, wxEXPAND|wxALL, 5);
-
- sEnhancements = new wxGridBagSizer(0, 0);
- sEnhancements->Add(AnisoText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sEnhancements->Add(m_MaxAnisotropyCB, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5);
- sEnhancements->Add(m_ForceFiltering, wxGBPosition(0, 2), wxGBSpan(1, 2), wxALL|wxALIGN_CENTER_VERTICAL, 5);
- sEnhancements->Add(MSAAText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sEnhancements->Add(m_MSAAModeCB, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5);
- sEnhancements->Add(PostShaderText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sEnhancements->Add(m_PostShaderCB, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 5);
- sEnhancements->Add(m_ReloadShader, wxGBPosition(2, 2), wxGBSpan(1, 1), wxALL, 5);
- sEnhancements->Add(m_EditShader, wxGBPosition(2, 3), wxGBSpan(1, 1), wxALL, 5);
- sbEnhancements->Add(sEnhancements);
- sGeneral->Add(sbEnhancements, 0, wxEXPAND|wxALL, 5);
- m_PageGeneral->SetSizer(sGeneral);
- sGeneral->Layout();
-
- // Information
- sbInfo = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Info"));
- m_ShowFPS = new wxCheckBox(m_PageAdvanced, ID_SHOWFPS, wxT("Overlay FPS"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_ShaderErrors = new wxCheckBox(m_PageAdvanced, ID_SHADERERRORS, wxT("Show shader compilation issues"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_ShaderErrors->Enable(false);
- m_Statistics = new wxCheckBox(m_PageAdvanced, ID_STATISTICS, wxT("Overlay some statistics"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_ProjStats = new wxCheckBox(m_PageAdvanced, ID_PROJSTATS, wxT("Overlay Projection Stats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_ShowEFBCopyRegions = new wxCheckBox(m_PageAdvanced, ID_SHOWEFBCOPYREGIONS, wxT("Show EFB Copy Regions"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_TexFmtOverlay = new wxCheckBox(m_PageAdvanced, ID_TEXFMTOVERLAY, wxT("Overlay texture format"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_TexFmtCenter = new wxCheckBox(m_PageAdvanced, ID_TEXFMTCENTER, wxT("centered"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
- // Render
- sbRendering = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Rendering"));
- m_Wireframe = new wxCheckBox(m_PageAdvanced, ID_WIREFRAME, wxT("Enable Wireframe"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_DisableLighting = new wxCheckBox(m_PageAdvanced, ID_DISABLELIGHTING, wxT("Disable Material Lighting"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_DisableTexturing = new wxCheckBox(m_PageAdvanced, ID_DISABLETEXTURING, wxT("Disable Texturing"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_DstAlphaPass = new wxCheckBox(m_PageAdvanced, ID_DSTALPHAPASS, wxT("Disable Destination Alpha Pass"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_DisableFog = new wxCheckBox(m_PageAdvanced, ID_DISABLEFOG, wxT("Disable Fog"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_PixelLighting = new wxCheckBox(m_PageAdvanced, ID_PIXELLIGHTING, wxT("Enable Pixel Lighting"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
- m_StaticBox_EFB = new wxStaticBox(m_PageAdvanced, ID_STATICBOX_EFB, wxT("EFB Copy"));
- m_CheckBox_DisableCopyEFB = new wxCheckBox(m_PageAdvanced, ID_CHECKBOX_DISABLECOPYEFB, wxT("Disable"));
- m_Radio_CopyEFBToRAM = new wxRadioButton(m_PageAdvanced, ID_RADIO_COPYEFBTORAM, wxT("To RAM (accuracy)"));
- m_Radio_CopyEFBToGL = new wxRadioButton(m_PageAdvanced, ID_RADIO_COPYEFBTOGL, wxT("To GL texture (performance)"));
- m_DlistCaching = new wxCheckBox(m_PageAdvanced, ID_DLISTCACHING, wxT("Use Dlist Caching"));
- // Utility
- sbUtilities = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Utilities"));
- m_DumpTextures = new wxCheckBox(m_PageAdvanced, ID_DUMPTEXTURES, wxT("Dump textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_HiresTextures = new wxCheckBox(m_PageAdvanced, ID_HIRESTEXTURES, wxT("Load Hires textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_DumpEFBTarget = new wxCheckBox(m_PageAdvanced, ID_DUMPEFBTARGET, wxT("Dump EFB Target"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_DumpFrames = new wxCheckBox(m_PageAdvanced, ID_DUMPFRAMES, wxT("Dump Rendered Frames"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_FreeLook = new wxCheckBox(m_PageAdvanced, ID_FREELOOK, wxT("Free Look"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
- // Hacks controls
- sHacks = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Hacks"));
- m_PhackvalueCB = new wxChoice(m_PageAdvanced, ID_PHACKVALUE, wxDefaultPosition, wxDefaultSize, arrayStringFor_PhackvalueCB, 0, wxDefaultValidator);
- m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_Radio_SafeTextureCache_Safe = new wxRadioButton(m_PageAdvanced, ID_RADIO_SAFETEXTURECACHE_SAFE, wxT("Safe"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
- m_Radio_SafeTextureCache_Normal = new wxRadioButton(m_PageAdvanced, ID_RADIO_SAFETEXTURECACHE_NORMAL, wxT("Normal"));
- m_Radio_SafeTextureCache_Fast = new wxRadioButton(m_PageAdvanced, ID_RADIO_SAFETEXTURECACHE_FAST, wxT("Fast"));
-
- // Sizers
- sHacks->Add(m_PhackvalueCB, 0, wxTOP, 0);
- sbHacks = new wxStaticBoxSizer(wxHORIZONTAL, m_PageAdvanced, wxT("Safe Texture Cache"));
- sbHacks->Add(m_SafeTextureCache, 0, wxALL, 5);
- sbHacks->AddStretchSpacer();
- sbHacks->Add(m_Radio_SafeTextureCache_Safe, 0, wxALL, 5);
- sbHacks->Add(m_Radio_SafeTextureCache_Normal, 0, wxALL, 5);
- sbHacks->Add(m_Radio_SafeTextureCache_Fast, 0, wxALL, 5);
- sbHacks->AddStretchSpacer();
- sHacks->Add(sbHacks, 0, wxEXPAND | (wxTOP), 5);
-
- // Sizers
- sAdvanced = new wxBoxSizer(wxVERTICAL);
- sInfo = new wxGridBagSizer(0, 0);
- sInfo->Add(m_ShowFPS, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
- sInfo->Add(m_ShaderErrors, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
- sInfo->Add(m_Statistics, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
- sInfo->Add(m_ProjStats, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALL, 5);
- sInfo->Add(m_ShowEFBCopyRegions, wxGBPosition(4, 0), wxGBSpan(1, 2), wxALL, 5);
- sInfo->Add(m_TexFmtOverlay, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALL, 5);
- sInfo->Add(m_TexFmtCenter, wxGBPosition(5, 1), wxGBSpan(1, 1), wxALL, 5);
- sbInfo->Add(sInfo);
-
- wxBoxSizer *sRenderBoxRow1 = new wxBoxSizer(wxHORIZONTAL);
- sRendering = new wxGridBagSizer(0, 0);
- sRendering->Add(m_Wireframe, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 4);
- sRendering->Add(m_DisableLighting, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 4);
- sRendering->Add(m_DisableTexturing, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL, 4);
- sRendering->Add(m_DstAlphaPass, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL, 4);
- sRendering->Add(m_DisableFog, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 4);
- sRendering->Add(m_DlistCaching, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALL, 4);
- sRendering->Add(m_PixelLighting, wxGBPosition(6, 0), wxGBSpan(1, 1), wxALL, 4);
-
- sRenderBoxRow1->Add(sRendering, 0, wxALL|wxEXPAND, 1);
- wxStaticBoxSizer *sSBox = new wxStaticBoxSizer(m_StaticBox_EFB, wxVERTICAL);
- wxBoxSizer *sStrip1 = new wxBoxSizer(wxHORIZONTAL);
- sStrip1->Add(m_CheckBox_DisableCopyEFB, 0, wxALL|wxEXPAND, 5);
- sSBox->Add(sStrip1, 0, wxALL|wxEXPAND, 0);
- sSBox->Add(m_Radio_CopyEFBToRAM, 0, wxALL|wxEXPAND, 5);
- sSBox->Add(m_Radio_CopyEFBToGL, 0, wxALL|wxEXPAND, 5);
- sRenderBoxRow1->Add(sSBox, 0, wxALL|wxEXPAND, 5);
- sbRendering->Add(sRenderBoxRow1);
-
- sUtilities = new wxGridBagSizer(0, 0);
- sUtilities->Add(m_DumpTextures, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sUtilities->Add(m_HiresTextures, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sUtilities->Add(m_DumpEFBTarget, wxGBPosition(0, 2), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sUtilities->Add(m_DumpFrames, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sUtilities->Add(m_FreeLook, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
- sbUtilities->Add(sUtilities, 1, wxEXPAND);
-
- // Sizers
- sAdvanced->Add(sbInfo, 0, wxEXPAND | wxALL, 5);
- sAdvanced->Add(sbRendering, 0, wxEXPAND | (wxLEFT | wxDOWN | wxRIGHT), 5);
- sAdvanced->Add(sbUtilities, 1, wxEXPAND | (wxLEFT | wxDOWN | wxRIGHT), 5);
- sAdvanced->Add(sHacks, 0, wxEXPAND | (wxLEFT | wxDOWN | wxRIGHT), 5);
-
- m_PageAdvanced->SetSizer(sAdvanced);
- sAdvanced->Layout();
-
- InitializeGUIValues();
- InitializeGUITooltips();
-
- Fit();
- Center();
- UpdateGUI();
-}
-
-void GFXConfigDialogOGL::AboutClick(wxCommandEvent& WXUNUSED (event))
-{
- wxMessageBox(wxT("Dolphin OpenGL Plugin\nBy zerofrog(@gmail.com)\n\n")
- wxT("A card supporting Vertex/Pixel Shader 2.0 or higher, framebuffer objects, ")
- wxT("and multiple render targets is required in order to use this plugin."),
- wxT("Dolphin OGL"), wxOK, this);
-}
-
-void GFXConfigDialogOGL::ReloadShaderClick(wxCommandEvent& WXUNUSED (event))
-{
- PostProcessing::ReloadShader();
-}
-
-void GFXConfigDialogOGL::EditShaderClick(wxCommandEvent& WXUNUSED (event))
-{
- if (m_PostShaderCB->GetStringSelection() == wxT("(off)"))
- return;
- wxString shader = wxString::From8BitData(File::GetUserPath(D_SHADERS_IDX)) + m_PostShaderCB->GetStringSelection() + _(".txt");
- if (wxFileExists(shader))
- {
- wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("txt"));
- if (filetype == NULL) // From extension failed, trying with MIME type now
- {
- filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_("text/plain"));
- if (filetype == NULL) // MIME type failed, aborting mission
- {
- PanicAlert("Filetype 'txt' is unknown! Will not open!");
- return;
- }
- }
- wxString OpenCommand;
- OpenCommand = filetype->GetOpenCommand(shader);
- if (OpenCommand.IsEmpty())
- PanicAlert("Couldn't find open command for extension 'ini'!");
- else
- if (wxExecute(OpenCommand, wxEXEC_ASYNC) == -1)
- PanicAlert("wxExecute returned -1 on application run!");
- }
-}
-
-void GFXConfigDialogOGL::GeneralSettingsChanged(wxCommandEvent& event)
-{
- switch (event.GetId())
- {
- case ID_EFBSCALEMODE:
- g_Config.iEFBScale = m_EFBScaleMode->GetSelection();
-
- break;
- case ID_VSYNC:
- g_Config.bVSync = m_VSync->IsChecked();
- break;
- case ID_USEXFB:
- g_Config.bUseXFB = m_UseXFB->IsChecked();
- break;
- case ID_USEREALXFB:
- g_Config.bUseRealXFB = m_UseRealXFB->IsChecked();
- break;
- case ID_USENATIVEMIPS:
- g_Config.bUseNativeMips = m_UseNativeMips->IsChecked();
- break;
- case ID_EFBSCALEDCOPY:
- g_Config.bCopyEFBScaled = m_EFBScaledCopy->IsChecked();
- break;
- case ID_ASPECT:
- g_Config.iAspectRatio = m_KeepAR->GetSelection();
- break;
- case ID_WIDESCREENHACK:
- g_Config.bWidescreenHack = m_WidescreenHack->IsChecked();
- break;
- case ID_CROP:
- g_Config.bCrop = m_Crop->IsChecked();
- break;
- case ID_FORCEFILTERING:
- g_Config.bForceFiltering = m_ForceFiltering->IsChecked();
- break;
- case ID_MAXANISOTROPY:
- g_Config.iMaxAnisotropy = m_MaxAnisotropyCB->GetSelection() + 1;
- break;
- case ID_MSAAMODECB:
- g_Config.iMultisampleMode = m_MSAAModeCB->GetSelection();
- break;
- case ID_PHACKVALUE:
- g_Config.iPhackvalue = m_PhackvalueCB->GetSelection();
- if (g_Config.iPhackvalue >= 0)
- {
- g_Config.UpdateProjectionHack();
- }
- break;
- case ID_POSTSHADER:
- g_Config.sPostProcessingShader = m_PostShaderCB->GetString(m_PostShaderCB->GetSelection()).mb_str();
- if (g_Config.sPostProcessingShader == "(off)")
- g_Config.sPostProcessingShader = "";
- break;
- }
-
- UpdateGUI();
-}
-
-void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
-{
- switch (event.GetId())
- {
- case ID_SHOWFPS:
- g_Config.bShowFPS = m_ShowFPS->IsChecked();
- break;
- case ID_SHADERERRORS:
- g_Config.bShowShaderErrors = m_ShaderErrors->IsChecked();
- break;
- case ID_STATISTICS:
- g_Config.bOverlayStats = m_Statistics->IsChecked();
- break;
- case ID_TEXFMTOVERLAY:
- g_Config.bTexFmtOverlayEnable = m_TexFmtOverlay->IsChecked();
- m_TexFmtCenter->Enable(m_TexFmtOverlay->IsChecked());
- TextureCache::Invalidate(false);
- break;
- case ID_TEXFMTCENTER:
- g_Config.bTexFmtOverlayCenter = m_TexFmtCenter->IsChecked();
- TextureCache::Invalidate(false);
- break;
- case ID_SHOWEFBCOPYREGIONS:
- g_Config.bShowEFBCopyRegions = m_ShowEFBCopyRegions->IsChecked();
- break;
- case ID_WIREFRAME:
- g_Config.bWireFrame = m_Wireframe->IsChecked();
- break;
- case ID_DISABLELIGHTING:
- g_Config.bDisableLighting = m_DisableLighting->IsChecked();
- break;
- case ID_DISABLETEXTURING:
- g_Config.bDisableTexturing = m_DisableTexturing->IsChecked();
- break;
- case ID_DISABLEFOG:
- g_Config.bDisableFog = m_DisableFog->IsChecked();
- break;
- case ID_PIXELLIGHTING:
- g_Config.bEnablePixelLigting = m_PixelLighting->IsChecked();
- break;
- case ID_DSTALPHAPASS:
- g_Config.bDstAlphaPass = m_DstAlphaPass->IsChecked();
- break;
- case ID_DUMPTEXTURES:
- g_Config.bDumpTextures = m_DumpTextures->IsChecked();
- break;
- case ID_HIRESTEXTURES:
- g_Config.bHiresTextures = m_HiresTextures->IsChecked();
- break;
- case ID_DUMPEFBTARGET:
- g_Config.bDumpEFBTarget = m_DumpEFBTarget->IsChecked();
- break;
- case ID_DUMPFRAMES:
- g_Config.bDumpFrames = m_DumpFrames->IsChecked();
- break;
- case ID_FREELOOK:
- g_Config.bFreeLook = m_FreeLook->IsChecked();
- break;
- case ID_TEXTUREPATH:
- break;
- case ID_CHECKBOX_DISABLECOPYEFB:
- g_Config.bEFBCopyDisable = m_CheckBox_DisableCopyEFB->IsChecked();
- break;
- case ID_OSDHOTKEY:
- g_Config.bOSDHotKey = m_OSDHotKey->IsChecked();
- break;
- // Hacks
- case ID_SAFETEXTURECACHE:
- g_Config.bSafeTextureCache = m_SafeTextureCache->IsChecked();
- break;
- case ID_DLISTCACHING:
- g_Config.bDlistCachingEnable = m_DlistCaching->IsChecked();
- break;
- case ID_RADIO_SAFETEXTURECACHE_SAFE:
- g_Config.iSafeTextureCache_ColorSamples = 0;
- break;
- case ID_RADIO_SAFETEXTURECACHE_NORMAL:
- if(g_Config.iSafeTextureCache_ColorSamples < 512)
- g_Config.iSafeTextureCache_ColorSamples = 512;
- break;
- case ID_RADIO_SAFETEXTURECACHE_FAST:
- if(g_Config.iSafeTextureCache_ColorSamples > 128 || g_Config.iSafeTextureCache_ColorSamples == 0)
- g_Config.iSafeTextureCache_ColorSamples = 128;
- break;
- case ID_HACK:
- g_Config.bHack = m_Hack->IsChecked();
- break;
- case ID_RADIO_COPYEFBTORAM:
- g_Config.bCopyEFBToTexture = false;
- break;
- case ID_RADIO_COPYEFBTOGL:
- g_Config.bCopyEFBToTexture = true;
- break;
- case ID_PROJSTATS:
- g_Config.bOverlayProjStats = m_ProjStats->IsChecked();
- break;
-
- default:
- break;
- }
-
- UpdateGUI();
-}
-
-void GFXConfigDialogOGL::CloseWindow()
-{
- // Save the config to INI
- g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
-
- EndModal(1);
-}
-
-void GFXConfigDialogOGL::UpdateGUI()
-{
- // This is only used together with the aspect ratio options
- m_Crop->Enable(g_Config.iAspectRatio != ASPECT_STRETCH);
- if (g_Config.bUseRealXFB)
- {
- // must use XFB to use real XFB
- g_Config.bUseXFB = true;
- m_UseXFB->SetValue(true);
-
- // XFB looks much better if the copy comes from native resolution.
- g_Config.iEFBScale = 2;
- m_EFBScaleMode->SetSelection(g_Config.iEFBScale);
- }
- m_UseXFB->Enable(!g_Config.bUseRealXFB);
-
- // Resolution settings
- m_EFBScaleMode->Enable(!g_Config.bUseRealXFB);
-
-
- // Disable the Copy to options when EFBCopy is disabled
- m_Radio_CopyEFBToRAM->Enable(!(g_Config.bEFBCopyDisable));
- m_Radio_CopyEFBToGL->Enable(!(g_Config.bEFBCopyDisable));
-
- // Disable/Enable Safe Texture Cache options
- m_Radio_SafeTextureCache_Safe->Enable(g_Config.bSafeTextureCache);
- m_Radio_SafeTextureCache_Normal->Enable(g_Config.bSafeTextureCache);
- m_Radio_SafeTextureCache_Fast->Enable(g_Config.bSafeTextureCache);
-}
-
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h
deleted file mode 100644
index dce267f9f4..0000000000
--- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// 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 _OGL_CONFIGDIALOG_H_
-#define _OGL_CONFIGDIALOG_H_
-
-#include <wx/wx.h>
-#include <wx/dialog.h>
-#include <wx/textctrl.h>
-#include <wx/button.h>
-#include <wx/stattext.h>
-#include <wx/choice.h>
-#include <wx/combobox.h>
-#include <wx/checkbox.h>
-#include <wx/notebook.h>
-#include <wx/panel.h>
-#include <wx/filepicker.h>
-#include <wx/gbsizer.h>
-
-enum
-{
- OGL_HACK_NONE = 0,
- OGL_HACK_ZELDA_TP_BLOOM_HACK = 1,
- OGL_HACK_SONIC_AND_THE_BLACK_KNIGHT = 2,
- OGL_HACK_BLEACH_VERSUS_CRUSADE = 3,
- OGL_HACK_SKIES_OF_ARCADIA = 4,
- OGL_HACK_METROID_OTHER_M = 5
-};
-
-
-class GFXConfigDialogOGL : public wxDialog
-{
- public:
- GFXConfigDialogOGL(wxWindow *parent, wxWindowID id = wxID_ANY,
-#ifdef DEBUGFAST
- const wxString &title = wxT("OpenGL (DEBUGFAST) Plugin Configuration"),
-#else
-#ifndef _DEBUG
- const wxString &title = wxT("OpenGL Plugin Configuration"),
-#else
- const wxString &title = wxT("OpenGL (DEBUG) Plugin Configuration"),
-#endif
-#endif
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_DIALOG_STYLE);
- virtual ~GFXConfigDialogOGL();
- void CloseClick(wxCommandEvent& event);
-
- void CreateGUIControls();
- void GameIniLoad();
-
- private:
- DECLARE_EVENT_TABLE();
-
- wxBoxSizer* sGeneral;
- wxStaticBoxSizer* sbBasic, *sbBasicAdvanced;
- wxGridBagSizer* sBasic, *sBasicAdvanced;
- wxStaticBoxSizer* sbEnhancements;
- wxGridBagSizer* sEnhancements;
- wxBoxSizer* sAdvanced;
- wxStaticBoxSizer* sbInfo;
- wxGridBagSizer* sInfo;
- wxStaticBoxSizer* sbRendering;
- wxGridBagSizer* sRendering;
- wxStaticBoxSizer* sbUtilities;
- wxGridBagSizer* sUtilities;
- wxStaticBoxSizer* sHacks;
- wxStaticBoxSizer* sbHacks;
-
- wxButton *m_About;
- wxButton *m_Close;
- wxButton *m_ReloadShader;
- wxButton *m_EditShader;
-
- wxNotebook *m_Notebook;
- wxPanel *m_PageGeneral;
- wxPanel *m_PageAdvanced;
- wxCheckBox *m_VSync;
- wxChoice *m_EFBScaleMode;
- wxCheckBox *m_WidescreenHack;
- wxCheckBox *m_ForceFiltering;
- wxCheckBox *m_Crop;
- wxCheckBox *m_UseXFB;
- wxCheckBox *m_UseNativeMips;
- wxCheckBox *m_EFBScaledCopy;
- wxCheckBox *m_UseRealXFB;
- wxChoice *m_MaxAnisotropyCB;
- wxChoice *m_MSAAModeCB, *m_PhackvalueCB, *m_PostShaderCB, *m_KeepAR;
-
- wxCheckBox *m_ShowFPS;
- wxCheckBox *m_ShaderErrors;
- wxCheckBox *m_Statistics;
- wxCheckBox *m_ProjStats;
- wxCheckBox *m_ShowEFBCopyRegions;
- wxCheckBox *m_TexFmtOverlay;
- wxCheckBox *m_TexFmtCenter;
- wxCheckBox *m_Wireframe;
- wxCheckBox *m_DisableLighting;
- wxCheckBox *m_DisableTexturing;
- wxCheckBox *m_DisableFog;
- wxCheckBox *m_DstAlphaPass;
- wxCheckBox *m_DumpTextures;
- wxCheckBox *m_HiresTextures;
- wxCheckBox *m_DumpEFBTarget;
- wxCheckBox *m_DumpFrames;
- wxCheckBox *m_FreeLook;
- wxCheckBox *m_PixelLighting;
- wxStaticBox * m_StaticBox_EFB;
- wxCheckBox *m_CheckBox_DisableCopyEFB;
- wxRadioButton *m_Radio_CopyEFBToRAM, *m_Radio_CopyEFBToGL;
- wxCheckBox *m_OSDHotKey;
- wxCheckBox *m_Hack;
- wxCheckBox *m_SafeTextureCache;
- wxRadioButton *m_Radio_SafeTextureCache_Safe;
- wxRadioButton *m_Radio_SafeTextureCache_Normal;
- wxRadioButton *m_Radio_SafeTextureCache_Fast;
- wxCheckBox *m_DlistCaching;
- // Screen size
- wxStaticText *m_TextScreenWidth, *m_TextScreenHeight, *m_TextScreenLeft, *m_TextScreenTop;
- wxSlider *m_SliderWidth, *m_SliderHeight, *m_SliderLeft, *m_SliderTop;
- wxCheckBox *m_ScreenSize;
-
- wxArrayString arrayStringFor_FullscreenCB;
- wxArrayString arrayStringFor_EFBScale;
- wxArrayString arrayStringFor_AspectRatio;
- wxArrayString arrayStringFor_MaxAnisotropyCB;
- wxArrayString arrayStringFor_MSAAModeCB;
- wxArrayString arrayStringFor_PhackvalueCB;
- wxArrayString arrayStringFor_PostShaderCB;
-
- enum
- {
- ID_NOTEBOOK = 1000,
- ID_PAGEGENERAL,
- ID_PAGEADVANCED,
-
- ID_VSYNC,
- ID_EFBSCALEMODE,
- ID_ASPECT,
- ID_CROP,
- ID_USEREALXFB,
- ID_USEXFB,
- ID_USENATIVEMIPS,
- ID_EFBSCALEDCOPY,
- ID_WIDESCREENHACK,
-
- ID_FORCEFILTERING,
- ID_MAXANISOTROPY,
- ID_MAXANISOTROPYTEXT,
- ID_MSAAMODECB,
- ID_MSAAMODETEXT,
-
- ID_SHOWFPS,
- ID_SHADERERRORS,
- ID_STATISTICS,
- ID_PROJSTATS,
- ID_SHOWEFBCOPYREGIONS,
- ID_TEXFMTOVERLAY,
- ID_TEXFMTCENTER,
-
- ID_WIREFRAME,
- ID_DISABLELIGHTING,
- ID_PIXELLIGHTING,
- ID_DISABLETEXTURING,
- ID_DISABLEFOG,
- ID_STATICBOX_EFB,
- ID_SAFETEXTURECACHE,
- ID_RADIO_SAFETEXTURECACHE_SAFE,
- ID_RADIO_SAFETEXTURECACHE_NORMAL,
- ID_RADIO_SAFETEXTURECACHE_FAST,
- ID_HACK,
- ID_PHACKVALUE,
- ID_DLISTCACHING,
-
- ID_DUMPTEXTURES,
- ID_HIRESTEXTURES,
- ID_DUMPEFBTARGET,
- ID_DUMPFRAMES,
- ID_FREELOOK,
- ID_TEXTUREPATH,
-
- ID_CHECKBOX_DISABLECOPYEFB,
- ID_OSDHOTKEY,
- //ID_PROJECTIONHACK1,
- ID_DSTALPHAPASS,
- ID_RADIO_COPYEFBTORAM,
- ID_RADIO_COPYEFBTOGL,
- ID_POSTSHADER,
- ID_POSTSHADERTEXT,
- ID_RELOADSHADER,
- ID_EDITSHADER,
-
- };
-
- void LoadShaders();
- void InitializeGUILists();
- void InitializeGUIValues();
- void InitializeGUITooltips();
-
- void OnClose(wxCloseEvent& event);
- void UpdateGUI();
- void UpdateHack();
-
- void AboutClick(wxCommandEvent& event);
- void ReloadShaderClick(wxCommandEvent& event);
- void EditShaderClick(wxCommandEvent& event);
- void GeneralSettingsChanged(wxCommandEvent& event);
- void AdvancedSettingsChanged(wxCommandEvent& event);
- void CloseWindow();
-};
-
-#endif // _OGL_CONFIGDIALOG_H_
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript
index 110aeeb9f2..26fae010c3 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript
+++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript
@@ -26,7 +26,6 @@ libs = [ 'videocommon', 'GLEW', 'SOIL', 'common' ]
if env['HAVE_WX']:
files += [
- 'GUI/ConfigDlg.cpp',
'Debugger/Debugger.cpp',
]
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
index 199359ce36..6531c64478 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
@@ -61,8 +61,7 @@ Make AA apply instantly during gameplay if possible
#endif
#if defined(HAVE_WX) && HAVE_WX
-#include "GUI/ConfigDlg.h"
-GFXConfigDialogOGL *m_ConfigFrame = NULL;
+#include "VideoConfigDiag.h"
#include "Debugger/Debugger.h"
#endif // HAVE_WX
@@ -159,6 +158,27 @@ void *DllDebugger(void *_hParent, bool Show)
#endif
}
+void GetShaders(std::vector<std::string> &shaders)
+{
+ shaders.clear();
+ if (File::IsDirectory(File::GetUserPath(D_SHADERS_IDX)))
+ {
+ File::FSTEntry entry;
+ File::ScanDirectoryTree(File::GetUserPath(D_SHADERS_IDX), entry);
+ for (u32 i = 0; i < entry.children.size(); i++)
+ {
+ std::string name = entry.children[i].virtualName.c_str();
+ if (!strcasecmp(name.substr(name.size() - 4).c_str(), ".txt"))
+ name = name.substr(0, name.size() - 4);
+ shaders.push_back(name);
+ }
+ }
+ else
+ {
+ File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
+ }
+}
+
void DllConfig(void *_hParent)
{
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
@@ -166,12 +186,19 @@ void DllConfig(void *_hParent)
g_Config.UpdateProjectionHack();
UpdateActiveConfig();
#if defined(HAVE_WX) && HAVE_WX
- m_ConfigFrame = new GFXConfigDialogOGL((wxWindow *)_hParent);
+ std::vector<std::string> adapters;
+
+ std::string caamodes[] = {"None", "2x", "4x", "8x", "8x CSAA", "8xQ CSAA", "16x CSAA", "16xQ CSAA"};
+ std::vector<std::string> aamodes(caamodes, caamodes + sizeof(caamodes)/sizeof(*caamodes));
+
+ std::vector<std::string> shaders;
+ GetShaders(shaders);
- m_ConfigFrame->CreateGUIControls();
- m_ConfigFrame->ShowModal();
- m_ConfigFrame->Destroy();
+ VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, "OpenGL", adapters, aamodes, shaders);
+ diag->ShowModal();
+ diag->Destroy();
#endif
+ g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
}
void Initialize(void *init)