diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2011-03-21 05:46:33 +0000 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2011-03-21 05:46:33 +0000 |
| commit | 068855bbd641efd0d941c2005fb4f33459e32b03 (patch) | |
| tree | eae52d160f4001a2bdf68a7d3cf70d6e9ec5fd91 /Source/Core/Common | |
| parent | 8eaed1c105d2ecd3c63cc728eee8bc1a493a27db (diff) | |
Moved per-game graphics configuration to the game-list right click menu. It will be too difficult to make the "profiles" drop-down thing work with 3-state vs 2-state checkboxes. The per-game settings now have "undetermined" states, except for the radio buttons(I'll fix that later). It's super hacky right now. Video config (probably all config stuff) could be redone.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7386 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/Common.h | 3 | ||||
| -rw-r--r-- | Source/Core/Common/Src/VideoBackendBase.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/Common/Src/VideoBackendBase.h | 10 |
3 files changed, 22 insertions, 2 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index a79666a683..7618f5329b 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -151,8 +151,7 @@ private: enum HOST_COMM { // Begin at 10 in case there is already messages with wParam = 0, 1, 2 and so on - WM_USER_PAUSE = 10, - WM_USER_STOP, + WM_USER_STOP = 10, WM_USER_CREATE, WM_USER_SETCURSOR, WM_USER_KEYDOWN, diff --git a/Source/Core/Common/Src/VideoBackendBase.cpp b/Source/Core/Common/Src/VideoBackendBase.cpp index 1fbe0f4a41..1c77ec7c9b 100644 --- a/Source/Core/Common/Src/VideoBackendBase.cpp +++ b/Source/Core/Common/Src/VideoBackendBase.cpp @@ -16,6 +16,7 @@ // http://code.google.com/p/dolphin-emu/ #include "VideoBackendBase.h" +#include "../../VideoCommon/Src/VideoConfig.h" // TODO: ugly #ifdef _WIN32 @@ -73,3 +74,13 @@ void VideoBackend::ActivateBackend(const std::string& name) if (name == (*it)->GetName()) g_video_backend = *it; } + +void VideoBackend::LoadConfig() +{ + g_Config.Load(((File::GetUserPath(D_CONFIG_IDX) + ini_name) + ".ini").c_str()); +} + +void VideoBackend::SaveConfig() +{ + g_Config.Save(((File::GetUserPath(D_CONFIG_IDX) + ini_name) + ".ini").c_str()); +} diff --git a/Source/Core/Common/Src/VideoBackendBase.h b/Source/Core/Common/Src/VideoBackendBase.h index 667a3d3a32..4e2690911f 100644 --- a/Source/Core/Common/Src/VideoBackendBase.h +++ b/Source/Core/Common/Src/VideoBackendBase.h @@ -83,6 +83,10 @@ struct SCPFifoStruct class VideoBackend { public: + const char* const ini_name; + + VideoBackend(const char* _ini_name) : ini_name(_ini_name) {} + virtual ~VideoBackend() {} virtual void EmuStateChange(EMUSTATE_CHANGE) = 0; @@ -127,6 +131,9 @@ public: virtual writeFn16 Video_PEWrite16() = 0; virtual writeFn32 Video_PEWrite32() = 0; + void LoadConfig(); + void SaveConfig(); + static void PopulateList(); static void ClearList(); static void ActivateBackend(const std::string& name); @@ -138,6 +145,9 @@ extern VideoBackend* g_video_backend; // inherited by dx9/dx11/ogl backends class VideoBackendHardware : public VideoBackend { +protected: + VideoBackendHardware(const char* _ini_name) : VideoBackend(_ini_name) {} + void DoState(PointerWrap &p); void RunLoop(bool enable); |
