From 496a7b70997a50995c02bf17f8c23e7d192d1ada Mon Sep 17 00:00:00 2001 From: Erik Abair Date: Tue, 10 May 2022 14:45:54 -0700 Subject: [PATCH] ui: Fix build with --enable-renderdoc and DEBUG_NV2A_GL --- ui/xui/gl-helpers.cc | 2 +- ui/xui/main.cc | 4 ++-- ui/xui/menubar.cc | 4 ++-- ui/xui/menubar.hh | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ui/xui/gl-helpers.cc b/ui/xui/gl-helpers.cc index e763acc2ff..488617990b 100644 --- a/ui/xui/gl-helpers.cc +++ b/ui/xui/gl-helpers.cc @@ -33,7 +33,7 @@ Fbo *controller_fbo, GLuint g_controller_tex, g_logo_tex; -enum ShaderType { +enum class ShaderType { Blit, BlitGamma, // FIMXE: Move to nv2a_get_framebuffer_surface Mask, diff --git a/ui/xui/main.cc b/ui/xui/main.cc index 9cfdbda05b..e46255d8ef 100644 --- a/ui/xui/main.cc +++ b/ui/xui/main.cc @@ -213,9 +213,9 @@ void xemu_hud_render(void) ProcessKeyboardShortcuts(); #if defined(DEBUG_NV2A_GL) && defined(CONFIG_RENDERDOC) - if (capture_renderdoc_frame) { + if (g_capture_renderdoc_frame) { nv2a_dbg_renderdoc_capture_frames(1); - capture_renderdoc_frame = false; + g_capture_renderdoc_frame = false; } #endif diff --git a/ui/xui/menubar.cc b/ui/xui/menubar.cc index 965d5df27e..0540631d10 100644 --- a/ui/xui/menubar.cc +++ b/ui/xui/menubar.cc @@ -31,7 +31,7 @@ extern float g_main_menu_height; // FIXME #ifdef CONFIG_RENDERDOC -static bool capture_renderdoc_frame = false; +bool g_capture_renderdoc_frame = false; #endif #if defined(__APPLE__) @@ -167,7 +167,7 @@ void ShowMainMenu() ImGui::MenuItem("Video", NULL, &video_window.m_is_open); #if defined(DEBUG_NV2A_GL) && defined(CONFIG_RENDERDOC) if (nv2a_dbg_renderdoc_available()) { - ImGui::MenuItem("RenderDoc: Capture", NULL, &capture_renderdoc_frame); + ImGui::MenuItem("RenderDoc: Capture", NULL, &g_capture_renderdoc_frame); } #endif ImGui::EndMenu(); diff --git a/ui/xui/menubar.hh b/ui/xui/menubar.hh index 00774afc48..04d8e19274 100644 --- a/ui/xui/menubar.hh +++ b/ui/xui/menubar.hh @@ -20,3 +20,7 @@ void ProcessKeyboardShortcuts(void); void ShowMainMenu(); + +#ifdef CONFIG_RENDERDOC +extern bool g_capture_renderdoc_frame; +#endif