mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
(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
|
||||
|
||||
@interface RetroArch_OSX : NSObject<RetroArch_Platform, NSApplicationDelegate>
|
||||
{
|
||||
@public
|
||||
NSWindow IBOutlet *window;
|
||||
}
|
||||
|
||||
+ (RetroArch_OSX*)get;
|
||||
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user