mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Make default graphics backend not show up as empty
Fixes https://bugs.dolphin-emu.org/issues/12245. I considered making a change to DolphinQt instead of the core, but then additional effort would've been required to add the same fix to the Android GUI once we start using the new config system there.
This commit is contained in:
@ -21,6 +21,8 @@ public:
|
||||
|
||||
void InitBackendInfo() override;
|
||||
|
||||
static constexpr const char* NAME = "D3D";
|
||||
|
||||
private:
|
||||
void FillBackendInfo();
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ namespace DX11
|
||||
{
|
||||
std::string VideoBackend::GetName() const
|
||||
{
|
||||
return "D3D";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
std::string VideoBackend::GetDisplayName() const
|
||||
|
@ -27,7 +27,7 @@ namespace DX12
|
||||
{
|
||||
std::string VideoBackend::GetName() const
|
||||
{
|
||||
return "D3D12";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
std::string VideoBackend::GetDisplayName() const
|
||||
|
@ -19,6 +19,8 @@ public:
|
||||
std::string GetDisplayName() const override;
|
||||
void InitBackendInfo() override;
|
||||
|
||||
static constexpr const char* NAME = "D3D12";
|
||||
|
||||
private:
|
||||
void FillBackendInfo();
|
||||
};
|
||||
|
@ -10,11 +10,14 @@ namespace Null
|
||||
{
|
||||
class VideoBackend final : public VideoBackendBase
|
||||
{
|
||||
public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override { return "Null"; }
|
||||
std::string GetName() const override { return NAME; }
|
||||
std::string GetDisplayName() const override;
|
||||
void InitBackendInfo() override;
|
||||
|
||||
static constexpr const char* NAME = "Null";
|
||||
};
|
||||
} // namespace Null
|
||||
|
@ -13,6 +13,7 @@ namespace OGL
|
||||
{
|
||||
class VideoBackend : public VideoBackendBase
|
||||
{
|
||||
public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
@ -21,6 +22,8 @@ class VideoBackend : public VideoBackendBase
|
||||
|
||||
void InitBackendInfo() override;
|
||||
|
||||
static constexpr const char* NAME = "OGL";
|
||||
|
||||
private:
|
||||
bool InitializeGLExtensions(GLContext* context);
|
||||
bool FillBackendInfo();
|
||||
|
@ -62,7 +62,7 @@ namespace OGL
|
||||
{
|
||||
std::string VideoBackend::GetName() const
|
||||
{
|
||||
return "OGL";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
std::string VideoBackend::GetDisplayName() const
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
|
||||
std::string VideoSoftware::GetName() const
|
||||
{
|
||||
return "Software Renderer";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
std::string VideoSoftware::GetDisplayName() const
|
||||
|
@ -19,5 +19,7 @@ class VideoSoftware : public VideoBackendBase
|
||||
std::optional<std::string> GetWarningMessage() const override;
|
||||
|
||||
void InitBackendInfo() override;
|
||||
|
||||
static constexpr const char* NAME = "Software Renderer";
|
||||
};
|
||||
} // namespace SW
|
||||
|
@ -15,9 +15,11 @@ public:
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override { return "Vulkan"; }
|
||||
std::string GetName() const override { return NAME; }
|
||||
std::string GetDisplayName() const override { return _trans("Vulkan"); }
|
||||
void InitBackendInfo() override;
|
||||
void PrepareWindow(WindowSystemInfo& wsi) override;
|
||||
|
||||
static constexpr const char* NAME = "Vulkan";
|
||||
};
|
||||
} // namespace Vulkan
|
||||
|
Reference in New Issue
Block a user