Cocoa Port: Synchronously force a framebuffer fetch on startup to guarantee that all display windows will appear black.

This commit is contained in:
rogerman 2017-11-27 21:17:16 -08:00
parent e18dd27d30
commit 258ebfd6ea
3 changed files with 7 additions and 3 deletions

View File

@ -78,6 +78,7 @@ typedef std::map<CGDirectDisplayID, int64_t> DisplayLinkFlushTimeLimitMap;
- (void) displayLinkStartUsingID:(CGDirectDisplayID)displayID;
- (void) displayLinkListUpdate;
- (void) fetchSynchronousAtIndex:(uint8_t)index;
- (void) signalFetchAtIndex:(uint8_t)index;
- (void) runFetchLoop;

View File

@ -196,8 +196,6 @@ public:
GPU->SetWillAutoResolveToCustomBuffer(false);
#endif
[self clearWithColor:0x8000];
return self;
}
@ -1197,6 +1195,11 @@ public:
pthread_mutex_unlock(&_mutexDisplayLinkLists);
}
- (void) fetchSynchronousAtIndex:(uint8_t)index
{
GPUFetchObject->FetchFromBufferIndex(index);
}
- (void) signalFetchAtIndex:(uint8_t)index
{
pthread_mutex_lock(&_mutexFetchExecute);

View File

@ -2254,7 +2254,7 @@
[[cdsCore cdsGPU] setRender3DFragmentSamplingHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_FragmentSamplingHack"]];
[[cdsCore cdsGPU] setGpuScale:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_ScalingFactor"]];
[[cdsCore cdsGPU] setGpuColorFormat:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_ColorFormat"]];
[[[cdsCore cdsGPU] sharedData] signalFetchAtIndex:0];
[[[cdsCore cdsGPU] sharedData] fetchSynchronousAtIndex:0];
// Set the stylus options per user preferences.
[[cdsCore cdsController] setStylusPressure:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_StylusPressure"]];