Merge pull request #14011 from Dentomologist/videobackend_rename_getname_to_getconfigname

VideoBackend: Rename GetName to GetConfigName
This commit is contained in:
JMC47 2025-10-13 21:19:41 -04:00 committed by GitHub
commit 81f620ba97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 31 additions and 31 deletions

View File

@ -370,7 +370,7 @@ void DolphinAnalytics::MakePerGameBuilder()
builder.AddData("cfg-render-to-main", Config::Get(Config::MAIN_RENDER_TO_MAIN)); builder.AddData("cfg-render-to-main", Config::Get(Config::MAIN_RENDER_TO_MAIN));
if (g_video_backend) if (g_video_backend)
{ {
builder.AddData("cfg-video-backend", g_video_backend->GetName()); builder.AddData("cfg-video-backend", g_video_backend->GetConfigName());
} }
// Video configuration. // Video configuration.

View File

@ -57,7 +57,7 @@ void GeneralWidget::CreateWidgets()
for (auto& backend : VideoBackendBase::GetAvailableBackends()) for (auto& backend : VideoBackendBase::GetAvailableBackends())
{ {
options.push_back(std::make_pair(tr(backend->GetDisplayName().c_str()), options.push_back(std::make_pair(tr(backend->GetDisplayName().c_str()),
QString::fromStdString(backend->GetName()))); QString::fromStdString(backend->GetConfigName())));
} }
m_backend_combo = new ConfigStringChoice(options, Config::MAIN_GFX_BACKEND, m_game_layer); m_backend_combo = new ConfigStringChoice(options, Config::MAIN_GFX_BACKEND, m_game_layer);
m_previous_backend = m_backend_combo->currentIndex(); m_previous_backend = m_backend_combo->currentIndex();

View File

@ -28,9 +28,9 @@
namespace DX11 namespace DX11
{ {
std::string VideoBackend::GetName() const std::string VideoBackend::GetConfigName() const
{ {
return NAME; return CONFIG_NAME;
} }
std::string VideoBackend::GetDisplayName() const std::string VideoBackend::GetDisplayName() const

View File

@ -14,13 +14,13 @@ public:
bool Initialize(const WindowSystemInfo& wsi) override; bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override; void Shutdown() override;
std::string GetName() const override; std::string GetConfigName() const override;
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
std::optional<std::string> GetWarningMessage() const override; std::optional<std::string> GetWarningMessage() const override;
void InitBackendInfo(const WindowSystemInfo& wsi) override; void InitBackendInfo(const WindowSystemInfo& wsi) override;
static constexpr const char* NAME = "D3D"; static constexpr const char* CONFIG_NAME = "D3D";
private: private:
void FillBackendInfo(); void FillBackendInfo();

View File

@ -26,9 +26,9 @@
namespace DX12 namespace DX12
{ {
std::string VideoBackend::GetName() const std::string VideoBackend::GetConfigName() const
{ {
return NAME; return CONFIG_NAME;
} }
std::string VideoBackend::GetDisplayName() const std::string VideoBackend::GetDisplayName() const

View File

@ -15,11 +15,11 @@ public:
bool Initialize(const WindowSystemInfo& wsi) override; bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override; void Shutdown() override;
std::string GetName() const override; std::string GetConfigName() const override;
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
void InitBackendInfo(const WindowSystemInfo& wsi) override; void InitBackendInfo(const WindowSystemInfo& wsi) override;
static constexpr const char* NAME = "D3D12"; static constexpr const char* CONFIG_NAME = "D3D12";
private: private:
void FillBackendInfo(); void FillBackendInfo();

View File

@ -29,9 +29,9 @@
#include "VideoCommon/VideoCommon.h" #include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h" #include "VideoCommon/VideoConfig.h"
std::string Metal::VideoBackend::GetName() const std::string Metal::VideoBackend::GetConfigName() const
{ {
return NAME; return CONFIG_NAME;
} }
std::string Metal::VideoBackend::GetDisplayName() const std::string Metal::VideoBackend::GetDisplayName() const

View File

@ -14,7 +14,7 @@ public:
bool Initialize(const WindowSystemInfo& wsi) override; bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override; void Shutdown() override;
std::string GetName() const override; std::string GetConfigName() const override;
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
std::optional<std::string> GetWarningMessage() const override; std::optional<std::string> GetWarningMessage() const override;
@ -22,6 +22,6 @@ public:
void PrepareWindow(WindowSystemInfo& wsi) override; void PrepareWindow(WindowSystemInfo& wsi) override;
static constexpr const char* NAME = "Metal"; static constexpr const char* CONFIG_NAME = "Metal";
}; };
} // namespace Metal } // namespace Metal

View File

@ -13,10 +13,10 @@ public:
bool Initialize(const WindowSystemInfo& wsi) override; bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override; void Shutdown() override;
std::string GetName() const override { return NAME; } std::string GetConfigName() const override { return CONFIG_NAME; }
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
void InitBackendInfo(const WindowSystemInfo& wsi) override; void InitBackendInfo(const WindowSystemInfo& wsi) override;
static constexpr const char* NAME = "Null"; static constexpr const char* CONFIG_NAME = "Null";
}; };
} // namespace Null } // namespace Null

View File

@ -61,9 +61,9 @@ Make AA apply instantly during gameplay if possible
namespace OGL namespace OGL
{ {
std::string VideoBackend::GetName() const std::string VideoBackend::GetConfigName() const
{ {
return NAME; return CONFIG_NAME;
} }
std::string VideoBackend::GetDisplayName() const std::string VideoBackend::GetDisplayName() const

View File

@ -16,12 +16,12 @@ public:
bool Initialize(const WindowSystemInfo& wsi) override; bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override; void Shutdown() override;
std::string GetName() const override; std::string GetConfigName() const override;
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
void InitBackendInfo(const WindowSystemInfo& wsi) override; void InitBackendInfo(const WindowSystemInfo& wsi) override;
static constexpr const char* NAME = "OGL"; static constexpr const char* CONFIG_NAME = "OGL";
private: private:
bool InitializeGLExtensions(GLContext* context); bool InitializeGLExtensions(GLContext* context);

View File

@ -38,9 +38,9 @@ public:
bool IsFlushed() const override { return true; } bool IsFlushed() const override { return true; }
}; };
std::string VideoSoftware::GetName() const std::string VideoSoftware::GetConfigName() const
{ {
return NAME; return CONFIG_NAME;
} }
std::string VideoSoftware::GetDisplayName() const std::string VideoSoftware::GetDisplayName() const

View File

@ -13,12 +13,12 @@ class VideoSoftware : public VideoBackendBase
bool Initialize(const WindowSystemInfo& wsi) override; bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override; void Shutdown() override;
std::string GetName() const override; std::string GetConfigName() const override;
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
std::optional<std::string> GetWarningMessage() const override; std::optional<std::string> GetWarningMessage() const override;
void InitBackendInfo(const WindowSystemInfo& wsi) override; void InitBackendInfo(const WindowSystemInfo& wsi) override;
static constexpr const char* NAME = "Software Renderer"; static constexpr const char* CONFIG_NAME = "Software Renderer";
}; };
} // namespace SW } // namespace SW

View File

@ -14,11 +14,11 @@ public:
bool Initialize(const WindowSystemInfo& wsi) override; bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override; void Shutdown() override;
std::string GetName() const override { return NAME; } std::string GetConfigName() const override { return CONFIG_NAME; }
std::string GetDisplayName() const override { return _trans("Vulkan"); } std::string GetDisplayName() const override { return _trans("Vulkan"); }
void InitBackendInfo(const WindowSystemInfo& wsi) override; void InitBackendInfo(const WindowSystemInfo& wsi) override;
void PrepareWindow(WindowSystemInfo& wsi) override; void PrepareWindow(WindowSystemInfo& wsi) override;
static constexpr const char* NAME = "Vulkan"; static constexpr const char* CONFIG_NAME = "Vulkan";
}; };
} // namespace Vulkan } // namespace Vulkan

View File

@ -86,7 +86,7 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
std::string VideoBackendBase::BadShaderFilename(const char* shader_stage, int counter) std::string VideoBackendBase::BadShaderFilename(const char* shader_stage, int counter)
{ {
return fmt::format("{}bad_{}_{}_{}.txt", File::GetUserPath(D_DUMP_IDX), shader_stage, return fmt::format("{}bad_{}_{}_{}.txt", File::GetUserPath(D_DUMP_IDX), shader_stage,
g_video_backend->GetName(), counter); g_video_backend->GetConfigName(), counter);
} }
// Run from the CPU thread (from VideoInterface.cpp) // Run from the CPU thread (from VideoInterface.cpp)
@ -169,7 +169,7 @@ static VideoBackendBase* GetDefaultVideoBackend()
std::string VideoBackendBase::GetDefaultBackendConfigName() std::string VideoBackendBase::GetDefaultBackendConfigName()
{ {
auto* default_backend = GetDefaultVideoBackend(); auto* default_backend = GetDefaultVideoBackend();
return default_backend ? default_backend->GetName() : ""; return default_backend ? default_backend->GetConfigName() : "";
} }
std::string VideoBackendBase::GetDefaultBackendDisplayName() std::string VideoBackendBase::GetDefaultBackendDisplayName()
@ -222,7 +222,7 @@ void VideoBackendBase::ActivateBackend(const std::string& name)
g_video_backend = GetDefaultVideoBackend(); g_video_backend = GetDefaultVideoBackend();
const auto& backends = GetAvailableBackends(); const auto& backends = GetAvailableBackends();
const auto iter = std::ranges::find(backends, name, &VideoBackendBase::GetName); const auto iter = std::ranges::find(backends, name, &VideoBackendBase::GetConfigName);
if (iter == backends.end()) if (iter == backends.end())
return; return;

View File

@ -37,8 +37,8 @@ public:
virtual bool Initialize(const WindowSystemInfo& wsi) = 0; virtual bool Initialize(const WindowSystemInfo& wsi) = 0;
virtual void Shutdown() = 0; virtual void Shutdown() = 0;
virtual std::string GetName() const = 0; virtual std::string GetConfigName() const = 0;
virtual std::string GetDisplayName() const { return GetName(); } virtual std::string GetDisplayName() const { return GetConfigName(); }
virtual void InitBackendInfo(const WindowSystemInfo& wsi) = 0; virtual void InitBackendInfo(const WindowSystemInfo& wsi) = 0;
virtual std::optional<std::string> GetWarningMessage() const { return {}; } virtual std::optional<std::string> GetWarningMessage() const { return {}; }