Add the currently active graphics system to the window title.

This commit is contained in:
gibbed 2017-08-09 00:40:44 -05:00
parent 8b5eb1cd38
commit 082c767fba
5 changed files with 14 additions and 0 deletions

View File

@ -392,6 +392,12 @@ void EmulatorWindow::UpdateTitle() {
title += L" - " + game_title;
}
auto graphics_system = emulator()->graphics_system();
if (graphics_system) {
auto graphics_name = graphics_system->name();
title += L" <" + graphics_name + L">";
}
if (Clock::guest_time_scalar() != 1.0) {
title += xe::format_string(L" (@%.2fx)", Clock::guest_time_scalar());
}

View File

@ -24,6 +24,8 @@ class GL4GraphicsSystem : public GraphicsSystem {
GL4GraphicsSystem();
~GL4GraphicsSystem() override;
std::wstring name() const override { return L"GL4"; }
X_STATUS Setup(cpu::Processor* processor, kernel::KernelState* kernel_state,
ui::Window* target_window) override;
void Shutdown() override;

View File

@ -34,6 +34,8 @@ class GraphicsSystem {
public:
virtual ~GraphicsSystem();
virtual std::wstring name() const = 0;
Memory* memory() const { return memory_; }
cpu::Processor* processor() const { return processor_; }
kernel::KernelState* kernel_state() const { return kernel_state_; }

View File

@ -24,6 +24,8 @@ class NullGraphicsSystem : public GraphicsSystem {
NullGraphicsSystem();
~NullGraphicsSystem() override;
std::wstring name() const override { return L"null"; }
X_STATUS Setup(cpu::Processor* processor, kernel::KernelState* kernel_state,
ui::Window* target_window) override;
void Shutdown() override;

View File

@ -24,6 +24,8 @@ class VulkanGraphicsSystem : public GraphicsSystem {
VulkanGraphicsSystem();
~VulkanGraphicsSystem() override;
std::wstring name() const override { return L"Vulkan"; }
X_STATUS Setup(cpu::Processor* processor, kernel::KernelState* kernel_state,
ui::Window* target_window) override;
void Shutdown() override;