Cocoa Port: Fix various presentation issues, focusing mostly on the OpenGL presenter and the Screenshot Capture Tool.
- Changing the display video source now updates the display window properly while the emulator is paused. - Fix bug in the Screenshot Capture Tool where screenshots would have incorrect colors if taken on a PowerPC Mac. - Fix bug in the Screenshot Capture Tool where screenshots would be completely black if a CPU-based pixel scaler on OpenGL was used. - The OpenGL presenter's GPU tiering system has been changed to be more strict. This effectively pushes many older GPUs into lower tiers. - The following pixel scalers now require at least a Low-Tier GPU (previously only required Bottom-Tier): 2xSaI, Super2xSaI, SuperEagle, HQ3x, HQ3xS, HQ4x, HQ4xS - The following pixel scalers now require at least a Mid-Tier GPU (previously only required Low-Tier): 2xBRZ, 3xBRZ - Due to the new changes to the GPU tiering system and allowed pixel scalers per tier, the Screenshot Capture Tool running OpenGL now allows pixel upscaling on the GPU instead of disabling it completely.
This commit is contained in:
parent
e8e3200a23
commit
f5ead86d89
File diff suppressed because it is too large
Load Diff
|
@ -349,6 +349,7 @@ protected:
|
|||
uint32_t *_srcNativeCloneMaster;
|
||||
uint32_t *_srcNativeClone[2][2];
|
||||
pthread_rwlock_t _srcCloneRWLock[2][2];
|
||||
bool _srcCloneNeedsUpdate[2][2];
|
||||
|
||||
virtual void _FetchNativeDisplayByID(const NDSDisplayID displayID, const u8 bufferIndex);
|
||||
virtual void _FetchCustomDisplayByID(const NDSDisplayID displayID, const u8 bufferIndex);
|
||||
|
@ -370,6 +371,7 @@ public:
|
|||
GLuint GetTexHQ4xLUT() const;
|
||||
|
||||
void CopyFromSrcClone(uint32_t *dstBufferPtr, const NDSDisplayID displayID, const u8 bufferIndex);
|
||||
void FetchNativeDisplayToSrcClone(const NDSDisplayID displayID, const u8 bufferIndex, bool needsLock);
|
||||
|
||||
virtual void Init();
|
||||
virtual void SetFetchBuffers(const NDSDisplayInfo ¤tDisplayInfo);
|
||||
|
|
|
@ -955,8 +955,6 @@
|
|||
OSSpinLockLock(&spinlockDisplayVideoSource);
|
||||
_cdv->Get3DPresenter()->SetDisplayVideoSource(NDSDisplayID_Main, (ClientDisplaySource)displaySourceID);
|
||||
OSSpinLockUnlock(&spinlockDisplayVideoSource);
|
||||
|
||||
_cdv->SetViewNeedsFlush();
|
||||
}
|
||||
|
||||
- (NSInteger) displayMainVideoSource
|
||||
|
@ -973,8 +971,6 @@
|
|||
OSSpinLockLock(&spinlockDisplayVideoSource);
|
||||
_cdv->Get3DPresenter()->SetDisplayVideoSource(NDSDisplayID_Touch, (ClientDisplaySource)displaySourceID);
|
||||
OSSpinLockUnlock(&spinlockDisplayVideoSource);
|
||||
|
||||
_cdv->SetViewNeedsFlush();
|
||||
}
|
||||
|
||||
- (NSInteger) displayTouchVideoSource
|
||||
|
|
|
@ -1908,6 +1908,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
- (void) setDisplayMainVideoSource:(NSInteger)displaySourceID
|
||||
{
|
||||
[[self cdsVideoOutput] setDisplayMainVideoSource:displaySourceID];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_REPROCESS_REDRAW];
|
||||
}
|
||||
|
||||
- (NSInteger) displayMainVideoSource
|
||||
|
@ -1918,6 +1919,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
- (void) setDisplayTouchVideoSource:(NSInteger)displaySourceID
|
||||
{
|
||||
[[self cdsVideoOutput] setDisplayTouchVideoSource:displaySourceID];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_REPROCESS_REDRAW];
|
||||
}
|
||||
|
||||
- (NSInteger) displayTouchVideoSource
|
||||
|
|
|
@ -245,7 +245,8 @@ static void* RunFileWriteThread(void *arg)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const NDSDisplayInfo &displayInfo = fetchObject->GetFetchDisplayInfoForBufferIndex( fetchObject->GetLastFetchIndex() );
|
||||
const u8 lastBufferIndex = fetchObject->GetLastFetchIndex();
|
||||
const NDSDisplayInfo &displayInfo = fetchObject->GetFetchDisplayInfoForBufferIndex(lastBufferIndex);
|
||||
|
||||
if ( (displayInfo.renderedWidth[NDSDisplayID_Main] == 0) || (displayInfo.renderedHeight[NDSDisplayID_Main] == 0) ||
|
||||
(displayInfo.renderedWidth[NDSDisplayID_Touch] == 0) || (displayInfo.renderedHeight[NDSDisplayID_Touch] == 0) )
|
||||
|
@ -312,7 +313,6 @@ static void* RunFileWriteThread(void *arg)
|
|||
#endif
|
||||
{
|
||||
cdp = new MacOGLDisplayPresenter(param.sharedData);
|
||||
filtersPreferGPU = false; // Just in case we're capturing the screenshot on an older GPU, perform the filtering on the CPU to avoid potential issues.
|
||||
}
|
||||
|
||||
cdp->Init();
|
||||
|
@ -338,8 +338,21 @@ static void* RunFileWriteThread(void *arg)
|
|||
else
|
||||
{
|
||||
// For custom-sized resolutions, apply all the filters as normal.
|
||||
cdp->SetPixelScaler(param.pixelScalerID);
|
||||
cdp->SetOutputFilter(param.outputFilterID);
|
||||
cdp->SetPixelScaler(param.pixelScalerID);
|
||||
|
||||
if (!cdp->WillFilterOnGPU())
|
||||
{
|
||||
if ( (param.cdpProperty.mode == ClientDisplayMode_Main) || (param.cdpProperty.mode == ClientDisplayMode_Dual) )
|
||||
{
|
||||
((OGLClientFetchObject *)fetchObject)->FetchNativeDisplayToSrcClone(NDSDisplayID_Main, lastBufferIndex, true);
|
||||
}
|
||||
|
||||
if ( (param.cdpProperty.mode == ClientDisplayMode_Touch) || (param.cdpProperty.mode == ClientDisplayMode_Dual) )
|
||||
{
|
||||
((OGLClientFetchObject *)fetchObject)->FetchNativeDisplayToSrcClone(NDSDisplayID_Touch, lastBufferIndex, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cdp->LoadDisplays();
|
||||
|
|
Loading…
Reference in New Issue