Cocoa Port:
- When clicking one of the Save Settings as Default buttons in one of the settings panels, force the user defaults file to synchronize immediately. This fixes updating the user defaults file on OS X v10.11 El Capitan. - Fix bug where video settings wouldn’t update immediately while the emulation is paused. (Regression from r5310). - Fix bug where if a ROM is unloaded, the previous video frame would remain instead of blacking out as intended. (Regression from r5310).
This commit is contained in:
parent
2fbd0685d1
commit
c40374df16
|
@ -417,6 +417,7 @@ enum
|
|||
MESSAGE_RESIZE_VIEW,
|
||||
MESSAGE_TRANSFORM_VIEW,
|
||||
MESSAGE_REDRAW_VIEW,
|
||||
MESSAGE_RELOAD_AND_REDRAW,
|
||||
MESSAGE_REPROCESS_AND_REDRAW,
|
||||
MESSAGE_SET_GPU_STATE_FLAGS,
|
||||
MESSAGE_CHANGE_DISPLAY_TYPE,
|
||||
|
|
|
@ -181,6 +181,7 @@ typedef struct
|
|||
- (void) handleResizeView:(NSData *)rectData;
|
||||
- (void) handleTransformView:(NSData *)transformData;
|
||||
- (void) handleRedrawView;
|
||||
- (void) handleReloadAndRedraw;
|
||||
- (void) handleReprocessAndRedraw;
|
||||
- (void) handleChangeDisplayOrientation:(NSData *)displayOrientationIdData;
|
||||
- (void) handleChangeDisplayOrder:(NSData *)displayOrderIdData;
|
||||
|
|
|
@ -797,6 +797,10 @@
|
|||
|
||||
switch (message)
|
||||
{
|
||||
case MESSAGE_RELOAD_AND_REDRAW:
|
||||
[self handleReloadAndRedraw];
|
||||
break;
|
||||
|
||||
case MESSAGE_REPROCESS_AND_REDRAW:
|
||||
[self handleReprocessAndRedraw];
|
||||
break;
|
||||
|
@ -920,6 +924,12 @@
|
|||
[(id<CocoaDSDisplayVideoDelegate>)delegate doRedraw];
|
||||
}
|
||||
|
||||
- (void) handleReloadAndRedraw
|
||||
{
|
||||
[self handleReceiveGPUFrame];
|
||||
[self handleEmuFrameProcessed];
|
||||
}
|
||||
|
||||
- (void) handleReprocessAndRedraw
|
||||
{
|
||||
[self handleEmuFrameProcessed];
|
||||
|
|
|
@ -343,7 +343,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
- (void) setVideoFiltersPreferGPU:(BOOL)theState
|
||||
{
|
||||
[[self view] setVideoFiltersPreferGPU:theState];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
}
|
||||
|
||||
- (BOOL) videoFiltersPreferGPU
|
||||
|
@ -354,7 +354,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
- (void) setVideoSourceDeposterize:(BOOL)theState
|
||||
{
|
||||
[[self view] setSourceDeposterize:theState];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
}
|
||||
|
||||
- (BOOL) videoSourceDeposterize
|
||||
|
@ -376,7 +376,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
- (void) setVideoPixelScaler:(NSInteger)filterID
|
||||
{
|
||||
[[self view] setPixelScaler:filterID];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[self cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
}
|
||||
|
||||
- (NSInteger) videoPixelScaler
|
||||
|
@ -926,11 +926,13 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
- (IBAction) writeDefaultsDisplayRotation:(id)sender
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] setDouble:[self displayRotation] forKey:@"DisplayView_Rotation"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsDisplayGap:(id)sender
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] setDouble:([self displayGap] * 100.0) forKey:@"DisplayViewCombo_Gap"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsHUDSettings:(id)sender
|
||||
|
@ -944,6 +946,8 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDRealTimeClockVisible] forKey:@"HUD_ShowRTC"];
|
||||
// TODO: Show HUD Input.
|
||||
//[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDInputVisible] forKey:@"HUD_ShowInput"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsDisplayVideoSettings:(id)sender
|
||||
|
@ -953,6 +957,8 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
[[NSUserDefaults standardUserDefaults] setInteger:[self videoOutputFilter] forKey:@"DisplayView_OutputFilter"];
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[self videoPixelScaler] forKey:@"DisplayView_VideoFilter"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[[self view] useVerticalSync] forKey:@"DisplayView_UseVerticalSync"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
#pragma mark NSUserInterfaceValidations Protocol
|
||||
|
|
|
@ -348,7 +348,7 @@
|
|||
{
|
||||
DisplayWindowController *newWindowController = [[DisplayWindowController alloc] initWithWindowNibName:@"DisplayWindow" emuControlDelegate:self];
|
||||
|
||||
[CocoaDSUtil messageSendOneWay:[[newWindowController cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[newWindowController cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
|
||||
[[newWindowController window] makeKeyAndOrderFront:self];
|
||||
[[newWindowController window] makeMainWindow];
|
||||
|
@ -954,6 +954,8 @@
|
|||
[[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DMultisample] forKey:@"Render3D_Multisample"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DFragmentSamplingHack] forKey:@"Render3D_FragmentSamplingHack"];
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[[cdsCore cdsGPU] gpuScale] forKey:@"Render3D_ScalingFactor"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsEmulationSettings:(id)sender
|
||||
|
@ -981,6 +983,8 @@
|
|||
[[NSUserDefaults standardUserDefaults] setObject:[firmwareDict valueForKey:@"FavoriteColor"] forKey:@"FirmwareConfig_FavoriteColor"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[firmwareDict valueForKey:@"Birthday"] forKey:@"FirmwareConfig_Birthday"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[firmwareDict valueForKey:@"Language"] forKey:@"FirmwareConfig_Language"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsSlot1Settings:(id)sender
|
||||
|
@ -989,6 +993,8 @@
|
|||
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[cdsCore slot1DeviceType] forKey:@"EmulationSlot1_DeviceType"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[[cdsCore slot1R4URL] path] forKey:@"EmulationSlot1_R4StoragePath"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsSoundSettings:(id)sender
|
||||
|
@ -1001,6 +1007,8 @@
|
|||
[[NSUserDefaults standardUserDefaults] setInteger:[[speakerBindings valueForKey:@"spuInterpolationMode"] integerValue] forKey:@"SPU_InterpolationMode"];
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[[speakerBindings valueForKey:@"spuSyncMode"] integerValue] forKey:@"SPU_SyncMode"];
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[[speakerBindings valueForKey:@"spuSyncMethod"] integerValue] forKey:@"SPU_SyncMethod"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) writeDefaultsStylusSettings:(id)sender
|
||||
|
@ -1010,6 +1018,8 @@
|
|||
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[cdsController stylusPressure] forKey:@"Emulation_StylusPressure"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[cdsController stylusEnableJitter] forKey:@"Emulation_StylusEnableJitter"];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (IBAction) closeSheet:(id)sender
|
||||
|
@ -1497,7 +1507,7 @@
|
|||
|
||||
for (DisplayWindowController *windowController in windowList)
|
||||
{
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
}
|
||||
|
||||
[self setStatusText:NSSTRING_STATUS_EMULATOR_RESET];
|
||||
|
@ -1800,7 +1810,7 @@
|
|||
|
||||
for (DisplayWindowController *windowController in windowList)
|
||||
{
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
}
|
||||
|
||||
[self setStatusText:NSSTRING_STATUS_ROM_LOADED];
|
||||
|
@ -1879,7 +1889,7 @@
|
|||
[[cdsCore cdsGPU] clearWithColor:0x8000];
|
||||
for (DisplayWindowController *windowController in windowList)
|
||||
{
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
}
|
||||
|
||||
[self setStatusText:NSSTRING_STATUS_ROM_UNLOADED];
|
||||
|
|
|
@ -373,7 +373,9 @@ static NSDictionary *hidUsageTable = nil;
|
|||
|
||||
NSMutableDictionary *newInputDeviceDict = [NSMutableDictionary dictionaryWithDictionary:savedInputDeviceDict];
|
||||
[newInputDeviceDict setObject:[self propertiesDictionary] forKey:[self identifier]];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject:newInputDeviceDict forKey:@"Input_SavedDeviceProperties"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (void) start
|
||||
|
@ -1593,6 +1595,7 @@ static std::unordered_map<unsigned short, std::string> keyboardNameTable; // Key
|
|||
- (void) writeDefaultsInputMappings
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[self inputMappings] forKey:@"Input_ControllerMappings"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (NSString *) commandTagFromInputList:(NSArray *)inputList
|
||||
|
|
|
@ -217,6 +217,7 @@
|
|||
}
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject:viewStatesDict forKey:@"RomInfoPanel_SectionViewState"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
#pragma mark NSPanel Methods
|
||||
|
|
|
@ -690,7 +690,7 @@
|
|||
}
|
||||
|
||||
// Draw the display view now so that we guarantee that its drawn at least once.
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_REPROCESS_AND_REDRAW];
|
||||
[CocoaDSUtil messageSendOneWay:[[windowController cdsVideoOutput] receivePort] msgID:MESSAGE_RELOAD_AND_REDRAW];
|
||||
|
||||
// If this window is set to full screen mode, its associated screen index must
|
||||
// exist. If not, this window will not enter full screen mode. This is necessary,
|
||||
|
|
Loading…
Reference in New Issue