mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 07:21:18 +12:00
fix: GPU capture button not working
This commit is contained in:
parent
813c52c23c
commit
337ec6b721
2 changed files with 7 additions and 10 deletions
|
@ -188,6 +188,9 @@ MetalRenderer::MetalRenderer()
|
||||||
m_copyBufferToBufferPipeline = new MetalVoidVertexPipeline(this, utilityLibrary, "vertexCopyBufferToBuffer");
|
m_copyBufferToBufferPipeline = new MetalVoidVertexPipeline(this, utilityLibrary, "vertexCopyBufferToBuffer");
|
||||||
|
|
||||||
utilityLibrary->release();
|
utilityLibrary->release();
|
||||||
|
|
||||||
|
// HACK: for some reason, this variable ends up being initialized to some garbage data, even though its declared as bool m_captureFrame = false;
|
||||||
|
m_captureFrame = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MetalRenderer::~MetalRenderer()
|
MetalRenderer::~MetalRenderer()
|
||||||
|
|
|
@ -1013,16 +1013,10 @@ void MainWindow::OnDebugSetting(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
else if (event.GetId() == MAINFRAME_MENU_ID_DEBUG_GPU_CAPTURE)
|
else if (event.GetId() == MAINFRAME_MENU_ID_DEBUG_GPU_CAPTURE)
|
||||||
{
|
{
|
||||||
|
cemu_assert_debug(g_renderer->GetType() == RendererAPI::Metal);
|
||||||
|
|
||||||
#if ENABLE_METAL
|
#if ENABLE_METAL
|
||||||
if (g_renderer->GetType() == RendererAPI::Metal)
|
static_cast<MetalRenderer*>(g_renderer.get())->CaptureFrame();
|
||||||
{
|
|
||||||
static_cast<MetalRenderer*>(g_renderer.get())->CaptureFrame();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxMessageBox(_("GPU capture is only supported on Metal."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (event.GetId() == MAINFRAME_MENU_ID_DEBUG_AUDIO_AUX_ONLY)
|
else if (event.GetId() == MAINFRAME_MENU_ID_DEBUG_AUDIO_AUX_ONLY)
|
||||||
|
@ -2272,7 +2266,7 @@ void MainWindow::RecreateMenu()
|
||||||
auto accurateBarriers = debugMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_VK_ACCURATE_BARRIERS, _("&Accurate barriers (Vulkan)"), wxEmptyString);
|
auto accurateBarriers = debugMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_VK_ACCURATE_BARRIERS, _("&Accurate barriers (Vulkan)"), wxEmptyString);
|
||||||
accurateBarriers->Check(GetConfig().vk_accurate_barriers);
|
accurateBarriers->Check(GetConfig().vk_accurate_barriers);
|
||||||
|
|
||||||
auto gpuCapture = debugMenu->Append(MAINFRAME_MENU_ID_DEBUG_VK_ACCURATE_BARRIERS, _("&GPU capture (Metal)"), wxEmptyString);
|
auto gpuCapture = debugMenu->Append(MAINFRAME_MENU_ID_DEBUG_GPU_CAPTURE, _("&GPU capture (Metal)"));
|
||||||
gpuCapture->Enable(m_game_launched && g_renderer->GetType() == RendererAPI::Metal);
|
gpuCapture->Enable(m_game_launched && g_renderer->GetType() == RendererAPI::Metal);
|
||||||
|
|
||||||
debugMenu->AppendSeparator();
|
debugMenu->AppendSeparator();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue