mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-15 15:07:47 +00:00
VideoBackend: Rename GetName to GetConfigName
Make the function name more explicit and a better match for GetDisplayName. Change NAME to CONFIG_NAME while I'm at it.
This commit is contained in:
parent
e0e2c7461b
commit
5b4df5ae98
@ -370,7 +370,7 @@ void DolphinAnalytics::MakePerGameBuilder()
|
||||
builder.AddData("cfg-render-to-main", Config::Get(Config::MAIN_RENDER_TO_MAIN));
|
||||
if (g_video_backend)
|
||||
{
|
||||
builder.AddData("cfg-video-backend", g_video_backend->GetName());
|
||||
builder.AddData("cfg-video-backend", g_video_backend->GetConfigName());
|
||||
}
|
||||
|
||||
// Video configuration.
|
||||
|
@ -57,7 +57,7 @@ void GeneralWidget::CreateWidgets()
|
||||
for (auto& backend : VideoBackendBase::GetAvailableBackends())
|
||||
{
|
||||
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_previous_backend = m_backend_combo->currentIndex();
|
||||
|
@ -28,9 +28,9 @@
|
||||
|
||||
namespace DX11
|
||||
{
|
||||
std::string VideoBackend::GetName() const
|
||||
std::string VideoBackend::GetConfigName() const
|
||||
{
|
||||
return NAME;
|
||||
return CONFIG_NAME;
|
||||
}
|
||||
|
||||
std::string VideoBackend::GetDisplayName() const
|
||||
|
@ -14,13 +14,13 @@ public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override;
|
||||
std::string GetConfigName() const override;
|
||||
std::string GetDisplayName() const override;
|
||||
std::optional<std::string> GetWarningMessage() const override;
|
||||
|
||||
void InitBackendInfo(const WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "D3D";
|
||||
static constexpr const char* CONFIG_NAME = "D3D";
|
||||
|
||||
private:
|
||||
void FillBackendInfo();
|
||||
|
@ -26,9 +26,9 @@
|
||||
|
||||
namespace DX12
|
||||
{
|
||||
std::string VideoBackend::GetName() const
|
||||
std::string VideoBackend::GetConfigName() const
|
||||
{
|
||||
return NAME;
|
||||
return CONFIG_NAME;
|
||||
}
|
||||
|
||||
std::string VideoBackend::GetDisplayName() const
|
||||
|
@ -15,11 +15,11 @@ public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override;
|
||||
std::string GetConfigName() const override;
|
||||
std::string GetDisplayName() const override;
|
||||
void InitBackendInfo(const WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "D3D12";
|
||||
static constexpr const char* CONFIG_NAME = "D3D12";
|
||||
|
||||
private:
|
||||
void FillBackendInfo();
|
||||
|
@ -29,9 +29,9 @@
|
||||
#include "VideoCommon/VideoCommon.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
|
||||
|
@ -14,7 +14,7 @@ public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override;
|
||||
std::string GetConfigName() const override;
|
||||
std::string GetDisplayName() const override;
|
||||
std::optional<std::string> GetWarningMessage() const override;
|
||||
|
||||
@ -22,6 +22,6 @@ public:
|
||||
|
||||
void PrepareWindow(WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "Metal";
|
||||
static constexpr const char* CONFIG_NAME = "Metal";
|
||||
};
|
||||
} // namespace Metal
|
||||
|
@ -13,10 +13,10 @@ public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override { return NAME; }
|
||||
std::string GetConfigName() const override { return CONFIG_NAME; }
|
||||
std::string GetDisplayName() const override;
|
||||
void InitBackendInfo(const WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "Null";
|
||||
static constexpr const char* CONFIG_NAME = "Null";
|
||||
};
|
||||
} // namespace Null
|
||||
|
@ -61,9 +61,9 @@ Make AA apply instantly during gameplay if possible
|
||||
|
||||
namespace OGL
|
||||
{
|
||||
std::string VideoBackend::GetName() const
|
||||
std::string VideoBackend::GetConfigName() const
|
||||
{
|
||||
return NAME;
|
||||
return CONFIG_NAME;
|
||||
}
|
||||
|
||||
std::string VideoBackend::GetDisplayName() const
|
||||
|
@ -16,12 +16,12 @@ public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override;
|
||||
std::string GetConfigName() const override;
|
||||
std::string GetDisplayName() const override;
|
||||
|
||||
void InitBackendInfo(const WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "OGL";
|
||||
static constexpr const char* CONFIG_NAME = "OGL";
|
||||
|
||||
private:
|
||||
bool InitializeGLExtensions(GLContext* context);
|
||||
|
@ -38,9 +38,9 @@ public:
|
||||
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
|
||||
|
@ -13,12 +13,12 @@ class VideoSoftware : public VideoBackendBase
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override;
|
||||
std::string GetConfigName() const override;
|
||||
std::string GetDisplayName() const override;
|
||||
std::optional<std::string> GetWarningMessage() const override;
|
||||
|
||||
void InitBackendInfo(const WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "Software Renderer";
|
||||
static constexpr const char* CONFIG_NAME = "Software Renderer";
|
||||
};
|
||||
} // namespace SW
|
||||
|
@ -14,11 +14,11 @@ public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) 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"); }
|
||||
void InitBackendInfo(const WindowSystemInfo& wsi) override;
|
||||
void PrepareWindow(WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "Vulkan";
|
||||
static constexpr const char* CONFIG_NAME = "Vulkan";
|
||||
};
|
||||
} // namespace Vulkan
|
||||
|
@ -86,7 +86,7 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
std::string VideoBackendBase::BadShaderFilename(const char* shader_stage, int counter)
|
||||
{
|
||||
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)
|
||||
@ -169,7 +169,7 @@ static VideoBackendBase* GetDefaultVideoBackend()
|
||||
std::string VideoBackendBase::GetDefaultBackendConfigName()
|
||||
{
|
||||
auto* default_backend = GetDefaultVideoBackend();
|
||||
return default_backend ? default_backend->GetName() : "";
|
||||
return default_backend ? default_backend->GetConfigName() : "";
|
||||
}
|
||||
|
||||
std::string VideoBackendBase::GetDefaultBackendDisplayName()
|
||||
@ -222,7 +222,7 @@ void VideoBackendBase::ActivateBackend(const std::string& name)
|
||||
g_video_backend = GetDefaultVideoBackend();
|
||||
|
||||
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())
|
||||
return;
|
||||
|
@ -37,8 +37,8 @@ public:
|
||||
virtual bool Initialize(const WindowSystemInfo& wsi) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual std::string GetName() const = 0;
|
||||
virtual std::string GetDisplayName() const { return GetName(); }
|
||||
virtual std::string GetConfigName() const = 0;
|
||||
virtual std::string GetDisplayName() const { return GetConfigName(); }
|
||||
virtual void InitBackendInfo(const WindowSystemInfo& wsi) = 0;
|
||||
virtual std::optional<std::string> GetWarningMessage() const { return {}; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user