mirror of https://github.com/cemu-project/Cemu.git
fix: GPU capture button not working
This commit is contained in:
parent
813c52c23c
commit
337ec6b721
|
@ -188,6 +188,9 @@ MetalRenderer::MetalRenderer()
|
|||
m_copyBufferToBufferPipeline = new MetalVoidVertexPipeline(this, utilityLibrary, "vertexCopyBufferToBuffer");
|
||||
|
||||
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()
|
||||
|
|
|
@ -1013,16 +1013,10 @@ void MainWindow::OnDebugSetting(wxCommandEvent& event)
|
|||
}
|
||||
else if (event.GetId() == MAINFRAME_MENU_ID_DEBUG_GPU_CAPTURE)
|
||||
{
|
||||
cemu_assert_debug(g_renderer->GetType() == RendererAPI::Metal);
|
||||
|
||||
#if ENABLE_METAL
|
||||
if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
{
|
||||
static_cast<MetalRenderer*>(g_renderer.get())->CaptureFrame();
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox(_("GPU capture is only supported on Metal."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
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);
|
||||
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);
|
||||
|
||||
debugMenu->AppendSeparator();
|
||||
|
|
Loading…
Reference in New Issue