ImGuiManager: Remove unused function

This commit is contained in:
Stenzek 2024-08-26 18:53:30 +10:00
parent 63bf64b05d
commit 2c27b20090
No known key found for this signature in database
9 changed files with 8 additions and 19 deletions

View File

@ -3715,7 +3715,7 @@ void CDROM::DrawDebugWindow()
{
static const ImVec4 active_color{1.0f, 1.0f, 1.0f, 1.0f};
static const ImVec4 inactive_color{0.4f, 0.4f, 0.4f, 1.0f};
const float framebuffer_scale = Host::GetOSDScale();
const float framebuffer_scale = ImGuiManager::GetGlobalScale();
ImGui::SetNextWindowSize(ImVec2(800.0f * framebuffer_scale, 580.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("CDROM State", nullptr))

View File

@ -6,7 +6,6 @@
#include "cdrom.h"
#include "cpu_core.h"
#include "gpu.h"
#include "host.h"
#include "imgui.h"
#include "interrupt_controller.h"
#include "mdec.h"
@ -918,7 +917,7 @@ void DMA::DrawDebugStateWindow()
{"#", "Req", "Direction", "Chopping", "Mode", "Busy", "Enable", "Priority", "IRQ", "Flag"}};
static constexpr std::array<const char*, 4> sync_mode_names = {{"Manual", "Request", "LinkedList", "Reserved"}};
const float framebuffer_scale = Host::GetOSDScale();
const float framebuffer_scale = ImGuiManager::GetGlobalScale();
ImGui::SetNextWindowSize(ImVec2(850.0f * framebuffer_scale, 250.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("DMA State", nullptr))

View File

@ -5,7 +5,6 @@
#include "dma.h"
#include "gpu_shadergen.h"
#include "host.h"
#include "imgui.h"
#include "interrupt_controller.h"
#include "settings.h"
#include "system.h"
@ -30,6 +29,7 @@
#include "IconsEmoji.h"
#include "fmt/format.h"
#include "imgui.h"
#include <cmath>
#include <numbers>
@ -2875,7 +2875,7 @@ bool GPU::DumpVRAMToFile(const char* filename, u32 width, u32 height, u32 stride
void GPU::DrawDebugStateWindow()
{
const float framebuffer_scale = Host::GetOSDScale();
const float framebuffer_scale = ImGuiManager::GetGlobalScale();
ImGui::SetNextWindowSize(ImVec2(450.0f * framebuffer_scale, 550.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("GPU", nullptr))

View File

@ -3961,7 +3961,7 @@ void GPU_HW::DrawRendererStats()
static const ImVec4 inactive_color{0.4f, 0.4f, 0.4f, 1.0f};
ImGui::Columns(2);
ImGui::SetColumnWidth(0, 200.0f * Host::GetOSDScale());
ImGui::SetColumnWidth(0, 200.0f * ImGuiManager::GetGlobalScale());
ImGui::TextUnformatted("Resolution Scale:");
ImGui::NextColumn();

View File

@ -4,7 +4,6 @@
#include "mdec.h"
#include "cpu_core.h"
#include "dma.h"
#include "host.h"
#include "system.h"
#include "timing_event.h"
@ -1058,7 +1057,7 @@ void MDEC::SetScaleMatrix(const u16* values)
void MDEC::DrawDebugStateWindow()
{
const float framebuffer_scale = Host::GetOSDScale();
const float framebuffer_scale = ImGuiManager::GetGlobalScale();
ImGui::SetNextWindowSize(ImVec2(300.0f * framebuffer_scale, 350.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("MDEC State", nullptr))

View File

@ -2500,7 +2500,7 @@ void SPU::DrawDebugStateWindow()
{
static const ImVec4 active_color{1.0f, 1.0f, 1.0f, 1.0f};
static const ImVec4 inactive_color{0.4f, 0.4f, 0.4f, 1.0f};
const float framebuffer_scale = Host::GetOSDScale();
const float framebuffer_scale = ImGuiManager::GetGlobalScale();
ImGui::SetNextWindowSize(ImVec2(800.0f * framebuffer_scale, 800.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("SPU State", nullptr))

View File

@ -3,7 +3,6 @@
#include "timers.h"
#include "gpu.h"
#include "host.h"
#include "interrupt_controller.h"
#include "system.h"
@ -501,7 +500,7 @@ void Timers::DrawDebugStateWindow()
{{"SysClk", "HBlank", "SysClk", "HBlank"}},
{{"SysClk", "DotClk", "SysClk/8", "SysClk/8"}}}};
const float framebuffer_scale = Host::GetOSDScale();
const float framebuffer_scale = ImGuiManager::GetGlobalScale();
ImGui::SetNextWindowSize(ImVec2(800.0f * framebuffer_scale, 115.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("Timer State", nullptr))

View File

@ -937,11 +937,6 @@ float ImGuiManager::GetGlobalScale()
return s_global_scale;
}
float Host::GetOSDScale()
{
return ImGuiManager::s_global_scale;
}
ImFont* ImGuiManager::GetStandardFont()
{
return s_standard_font;

View File

@ -130,9 +130,6 @@ static constexpr float OSD_WARNING_DURATION = 10.0f;
static constexpr float OSD_INFO_DURATION = 5.0f;
static constexpr float OSD_QUICK_DURATION = 2.5f;
/// Returns the scale of OSD elements.
float GetOSDScale();
/// Adds OSD messages, duration is in seconds.
void AddOSDMessage(std::string message, float duration = 2.0f);
void AddKeyedOSDMessage(std::string key, std::string message, float duration = 2.0f);