From 07e4b4f7c4079a8cef8f8e875ad281b508fc63e8 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 22 Sep 2015 03:25:37 +0300 Subject: VideoBackend: Video config filename is now exposed in VideoBackends. It reduces redundancy. Needed make possible to save current video config. --- Source/Core/VideoBackends/Software/SWmain.cpp | 9 +++++++-- Source/Core/VideoBackends/Software/VideoBackend.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/Software') diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp index 12713bcc4e..370a723ddb 100644 --- a/Source/Core/VideoBackends/Software/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/SWmain.cpp @@ -67,14 +67,19 @@ std::string VideoSoftware::GetDisplayName() const return "Software Renderer"; } +std::string VideoSoftware::GetConfigName() const +{ + return "gfx_software"; +} + void VideoSoftware::ShowConfig(void *hParent) { - Host_ShowVideoConfig(hParent, GetDisplayName(), "gfx_software"); + Host_ShowVideoConfig(hParent, GetDisplayName(), GetConfigName()); } bool VideoSoftware::Initialize(void *window_handle) { - g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_software.ini").c_str()); + g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + GetConfigName() + ".ini").c_str()); InitInterface(); GLInterface->SetMode(GLInterfaceMode::MODE_DETECT); diff --git a/Source/Core/VideoBackends/Software/VideoBackend.h b/Source/Core/VideoBackends/Software/VideoBackend.h index e34ae07f9a..6b4c79a5c7 100644 --- a/Source/Core/VideoBackends/Software/VideoBackend.h +++ b/Source/Core/VideoBackends/Software/VideoBackend.h @@ -19,6 +19,7 @@ class VideoSoftware : public VideoBackend std::string GetName() const override; std::string GetDisplayName() const override; + std::string GetConfigName() const override; void EmuStateChange(EMUSTATE_CHANGE newState) override; -- cgit v1.2.3