mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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
|
||||
@@ -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>
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
</VisualStudioProject>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
@@ -779,18 +779,6 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="UI"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\DlgSettings.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\DlgSettings.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Debugger"
|
||||
>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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_
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ set(LIBS videocommon
|
||||
|
||||
if(wxWidgets_FOUND)
|
||||
set(SRCS ${SRCS}
|
||||
Src/GUI/ConfigDlg.cpp
|
||||
Src/Debugger/Debugger.cpp)
|
||||
endif(wxWidgets_FOUND)
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -782,66 +782,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 suppressed because it is too large
Load Diff
@@ -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_
|
||||
@@ -26,7 +26,6 @@ libs = [ 'videocommon', 'GLEW', 'SOIL', 'common' ]
|
||||
|
||||
if env['HAVE_WX']:
|
||||
files += [
|
||||
'GUI/ConfigDlg.cpp',
|
||||
'Debugger/Debugger.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;
|
||||
|
||||
m_ConfigFrame->CreateGUIControls();
|
||||
m_ConfigFrame->ShowModal();
|
||||
m_ConfigFrame->Destroy();
|
||||
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);
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user