(OSX) Show an open panel if started without a game to load
This commit is contained in:
parent
ba94ae2479
commit
7a4085b67f
|
@ -67,6 +67,10 @@ void apple_run_core(RAModuleInfo* core, const char* file);
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface RetroArch_OSX : NSObject<RetroArch_Platform, NSApplicationDelegate>
|
@interface RetroArch_OSX : NSObject<RetroArch_Platform, NSApplicationDelegate>
|
||||||
|
{
|
||||||
|
@public
|
||||||
|
NSWindow IBOutlet *window;
|
||||||
|
}
|
||||||
|
|
||||||
+ (RetroArch_OSX*)get;
|
+ (RetroArch_OSX*)get;
|
||||||
|
|
||||||
|
|
|
@ -474,10 +474,6 @@ int main(int argc, char *argv[])
|
||||||
#ifdef OSX
|
#ifdef OSX
|
||||||
|
|
||||||
@implementation RetroArch_OSX
|
@implementation RetroArch_OSX
|
||||||
{
|
|
||||||
NSWindow IBOutlet *window;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (RetroArch_OSX*)get
|
+ (RetroArch_OSX*)get
|
||||||
{
|
{
|
||||||
return (RetroArch_OSX*)[[NSApplication sharedApplication] delegate];
|
return (RetroArch_OSX*)[[NSApplication sharedApplication] delegate];
|
||||||
|
@ -487,6 +483,9 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
apple_platform = self;
|
apple_platform = self;
|
||||||
|
|
||||||
|
if (!apple_is_running)
|
||||||
|
[self openDocument:nil];
|
||||||
|
|
||||||
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||||
|
|
||||||
window.backgroundColor = [NSColor blackColor];
|
window.backgroundColor = [NSColor blackColor];
|
||||||
|
|
|
@ -34,7 +34,7 @@ void apple_display_alert(NSString* message, NSString* title)
|
||||||
alert.messageText = title ? title : @"RetroArch";
|
alert.messageText = title ? title : @"RetroArch";
|
||||||
alert.informativeText = message;
|
alert.informativeText = message;
|
||||||
alert.alertStyle = NSInformationalAlertStyle;
|
alert.alertStyle = NSInformationalAlertStyle;
|
||||||
[alert beginSheetModalForWindow:NSApplication.sharedApplication.mainWindow
|
[alert beginSheetModalForWindow:RetroArch_OSX.get->window
|
||||||
modalDelegate:nil
|
modalDelegate:nil
|
||||||
didEndSelector:nil
|
didEndSelector:nil
|
||||||
contextInfo:nil];
|
contextInfo:nil];
|
||||||
|
|
Loading…
Reference in New Issue