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:
Jordan Woyak
2010-11-15 09:54:07 +00:00
parent 73ed235fd1
commit db35fe4100
19 changed files with 943 additions and 2239 deletions

View File

@ -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