From e18dd27d302a27dff9444eadd0e0fdf69a239c6d Mon Sep 17 00:00:00 2001 From: rogerman Date: Mon, 27 Nov 2017 21:15:26 -0800 Subject: [PATCH] Cocoa Port: Fix the Screenshot Capture Tool with running Metal. (Regression from commit f5ead86.) --- .../frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm index 4996f89ba..d1090b1cb 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm +++ b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm @@ -307,6 +307,7 @@ static void* RunFileWriteThread(void *arg) ClientDisplay3DPresenter *cdp = NULL; bool filtersPreferGPU = true; + bool isUsingMetal = false; #ifdef ENABLE_APPLE_METAL if ([param.sharedData isKindOfClass:[MetalDisplayViewSharedData class]]) @@ -319,6 +320,7 @@ static void* RunFileWriteThread(void *arg) } cdp = new MacMetalDisplayPresenter(param.sharedData); + isUsingMetal = true; } else #endif @@ -352,7 +354,8 @@ static void* RunFileWriteThread(void *arg) cdp->SetOutputFilter(param.outputFilterID); cdp->SetPixelScaler(param.pixelScalerID); - if (!cdp->WillFilterOnGPU()) + // Metal presenters are always assumed to filter on the GPU, so only do this for OpenGL. + if (!isUsingMetal && !cdp->WillFilterOnGPU() && (param.pixelScalerID != VideoFilterTypeID_None)) { if ( (param.cdpProperty.mode == ClientDisplayMode_Main) || (param.cdpProperty.mode == ClientDisplayMode_Dual) ) {