Cocoa Port: Fix a bug where Metal display view backing textures weren't updating their custom framebuffer sizes. (Regression from commit 4c01e66.)

This commit is contained in:
rogerman 2017-12-19 15:35:20 -08:00
parent 4c01e66a8a
commit f2f3680a7c
1 changed files with 24 additions and 22 deletions

View File

@ -391,8 +391,10 @@
_texDisplayPostprocessNative[NDSDisplayID_Main][i] = [device newTextureWithDescriptor:newTexPostprocessNativeDesc];
_texDisplayPostprocessNative[NDSDisplayID_Touch][i] = [device newTextureWithDescriptor:newTexPostprocessNativeDesc];
}
if ( ([_texDisplayFetchCustom[NDSDisplayID_Main][i] width] != w) ||
if ( (_fetchPixelBytes != dispInfo.pixelBytes) ||
([_texDisplayFetchCustom[NDSDisplayID_Main][i] width] != w) ||
([_texDisplayFetchCustom[NDSDisplayID_Main][i] height] != h) )
{
[_texDisplayFetchCustom[NDSDisplayID_Main][i] release];
@ -417,7 +419,6 @@
_texDisplayPostprocessCustom[NDSDisplayID_Touch][i] = [device newTextureWithDescriptor:newTexPostprocessCustomDesc];
}
}
}
_fetchPixelBytes = dispInfo.pixelBytes;
@ -675,6 +676,7 @@
}
id<MTLTexture> targetDestination = _texDisplayFetchNative[displayID][bufferIndex];
const NDSDisplayInfo &currentDisplayInfo = GPUFetchObject->GetFetchDisplayInfoForBufferIndex(bufferIndex);
[targetDestination replaceRegion:MTLRegionMake2D(0, 0, GPU_FRAMEBUFFER_NATIVE_WIDTH, GPU_FRAMEBUFFER_NATIVE_HEIGHT)