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