UI: Beginning of customizable settings, debug menu
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "YBaseLib/Error.h"
|
||||
#include "YBaseLib/Log.h"
|
||||
#include "core/digital_controller.h"
|
||||
#include "core/gpu.h"
|
||||
#include "core/memory_card.h"
|
||||
#include "core/system.h"
|
||||
#include "icon.h"
|
||||
@ -458,7 +459,8 @@ void SDLInterface::RenderImGui()
|
||||
{
|
||||
RenderMainMenuBar();
|
||||
|
||||
m_system->RenderUI();
|
||||
if (m_show_gpu_statistics)
|
||||
m_system->GetGPU()->RenderStatistics();
|
||||
|
||||
RenderOSDMessages();
|
||||
|
||||
@ -518,6 +520,48 @@ void SDLInterface::RenderMainMenuBar()
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Settings"))
|
||||
{
|
||||
if (ImGui::BeginMenu("GPU"))
|
||||
{
|
||||
if (ImGui::BeginMenu("Internal Resolution"))
|
||||
{
|
||||
const u32 current_internal_resolution = m_system->GetSettings().gpu_resolution_scale;
|
||||
for (u32 scale = 1; scale <= 16; scale++)
|
||||
{
|
||||
bool selected = current_internal_resolution == scale;
|
||||
if (ImGui::MenuItem(
|
||||
TinyString::FromFormat("%ux (%ux%u)", scale, scale * GPU::VRAM_WIDTH, scale * GPU::VRAM_HEIGHT),
|
||||
nullptr, &selected))
|
||||
{
|
||||
m_system->GetSettings().gpu_resolution_scale = scale;
|
||||
m_system->UpdateSettings();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Debug"))
|
||||
{
|
||||
if (ImGui::BeginMenu("GPU"))
|
||||
{
|
||||
ImGui::MenuItem("Show Statistics", nullptr, &m_show_gpu_statistics);
|
||||
ImGui::Separator();
|
||||
|
||||
m_system->GetGPU()->RenderDebugMenu();
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
ImGui::SetCursorPosX(ImGui::GetIO().DisplaySize.x - 170.0f);
|
||||
ImGui::Text("FPS: %.2f", m_fps);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user