mirror of https://github.com/OpenTTD/OpenTTD
Fix: Implement support for secure state coding on macOS
Fixes a warning when running on macOS 14 and newer about not officially supporting secure state coding.pull/12650/head
parent
c2daabc010
commit
071796660d
|
@ -261,6 +261,18 @@ static NSImage *NSImageFromSprite(SpriteID sprite_id, ZoomLevel zoom)
|
||||||
{
|
{
|
||||||
[ [ NSNotificationCenter defaultCenter ] removeObserver:self ];
|
[ [ NSNotificationCenter defaultCenter ] removeObserver:self ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates to AppKit that OpenTTD is compatible with secure state storage.
|
||||||
|
* Starting with macOS 12, macOS expects us to be better compatible with NSSecureCoding, as to prevent attacks through restorable storage.
|
||||||
|
* Starting with 14, macOS logs a warning if we don't implement this ourselves. Since OpenTTD does not (yet) make use of restorable state, we simply don't care what happens with it.
|
||||||
|
*
|
||||||
|
* Explained here: https://developer.apple.com/documentation/foundation/nssecurecoding
|
||||||
|
*/
|
||||||
|
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication*) sender
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue