mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
(OSX) Some logic fixups
This commit is contained in:
parent
8f1ea1f3cd
commit
c4feba628b
@ -388,11 +388,9 @@
|
||||
<nil key="NSViewClass"/>
|
||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||
<object class="NSView" key="NSWindowView" id="439893737">
|
||||
<reference key="NSNextResponder"/>
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{480, 360}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
@ -467,8 +465,8 @@
|
||||
<int key="NSTag">1</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSComboBoxCell" key="NSCell" id="50876060">
|
||||
<int key="NSCellFlags">342884416</int>
|
||||
<int key="NSCellFlags2">272630784</int>
|
||||
<int key="NSCellFlags">74448961</int>
|
||||
<int key="NSCellFlags2">268436480</int>
|
||||
<string key="NSContents"/>
|
||||
<reference key="NSSupport" ref="698260743"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
|
@ -517,6 +517,11 @@ int main(int argc, char *argv[])
|
||||
for (RAModuleInfo* i in RAModuleInfo.getModules)
|
||||
[cb addItemWithObjectValue:i];
|
||||
|
||||
if (cb.numberOfItems)
|
||||
[cb selectItemAtIndex:0];
|
||||
else
|
||||
apple_display_alert(@"No libretro cores were found.", @"RetroArch");
|
||||
|
||||
// Run RGUI if needed
|
||||
if (!_wantReload)
|
||||
apple_run_core(nil, 0);
|
||||
@ -550,7 +555,11 @@ int main(int argc, char *argv[])
|
||||
if (filenames.count == 1 && filenames[0])
|
||||
{
|
||||
_file = filenames[0];
|
||||
[self chooseCore];
|
||||
|
||||
if (!_loaded)
|
||||
_wantReload = true;
|
||||
else
|
||||
[self chooseCore];
|
||||
|
||||
[sender replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
|
||||
}
|
||||
@ -643,6 +652,11 @@ int main(int argc, char *argv[])
|
||||
apple_frontend_post_event(&event_basic_command, (void*)((NSMenuItem*)sender).tag);
|
||||
}
|
||||
|
||||
- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
|
||||
{
|
||||
[NSApplication.sharedApplication stopModal];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -35,9 +35,10 @@ void apple_display_alert(NSString* message, NSString* title)
|
||||
alert.informativeText = message;
|
||||
alert.alertStyle = NSInformationalAlertStyle;
|
||||
[alert beginSheetModalForWindow:RetroArch_OSX.get->window
|
||||
modalDelegate:nil
|
||||
didEndSelector:nil
|
||||
modalDelegate:apple_platform
|
||||
didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:nil];
|
||||
[NSApplication.sharedApplication runModalForWindow:alert.window];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user