(OSX) Show an open panel if started without a game to load

This commit is contained in:
meancoot 2013-07-07 15:19:19 -04:00
parent ba94ae2479
commit 7a4085b67f
3 changed files with 8 additions and 5 deletions

View File

@ -67,6 +67,10 @@ void apple_run_core(RAModuleInfo* core, const char* file);
@end
@interface RetroArch_OSX : NSObject<RetroArch_Platform, NSApplicationDelegate>
{
@public
NSWindow IBOutlet *window;
}
+ (RetroArch_OSX*)get;

View File

@ -474,10 +474,6 @@ int main(int argc, char *argv[])
#ifdef OSX
@implementation RetroArch_OSX
{
NSWindow IBOutlet *window;
}
+ (RetroArch_OSX*)get
{
return (RetroArch_OSX*)[[NSApplication sharedApplication] delegate];
@ -487,6 +483,9 @@ int main(int argc, char *argv[])
{
apple_platform = self;
if (!apple_is_running)
[self openDocument:nil];
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
window.backgroundColor = [NSColor blackColor];

View File

@ -34,7 +34,7 @@ void apple_display_alert(NSString* message, NSString* title)
alert.messageText = title ? title : @"RetroArch";
alert.informativeText = message;
alert.alertStyle = NSInformationalAlertStyle;
[alert beginSheetModalForWindow:NSApplication.sharedApplication.mainWindow
[alert beginSheetModalForWindow:RetroArch_OSX.get->window
modalDelegate:nil
didEndSelector:nil
contextInfo:nil];