Remove Cocoa spam from the SDL port
This commit is contained in:
parent
d8a9f12a4f
commit
336bc65dbf
@ -5,6 +5,8 @@
|
||||
char *do_open_rom_dialog(void)
|
||||
{
|
||||
@autoreleasepool {
|
||||
int stderr_fd = dup(STDERR_FILENO);
|
||||
close(STDERR_FILENO);
|
||||
NSWindow *key = [NSApp keyWindow];
|
||||
NSOpenPanel *dialog = [NSOpenPanel openPanel];
|
||||
dialog.title = @"Open ROM";
|
||||
@ -12,6 +14,7 @@ char *do_open_rom_dialog(void)
|
||||
[dialog runModal];
|
||||
[key makeKeyAndOrderFront:nil];
|
||||
NSString *ret = [[[dialog URLs] firstObject] path];
|
||||
dup2(stderr_fd, STDERR_FILENO);
|
||||
if (ret) {
|
||||
return strdup(ret.UTF8String);
|
||||
}
|
||||
@ -22,6 +25,8 @@ char *do_open_rom_dialog(void)
|
||||
char *do_open_folder_dialog(void)
|
||||
{
|
||||
@autoreleasepool {
|
||||
int stderr_fd = dup(STDERR_FILENO);
|
||||
close(STDERR_FILENO);
|
||||
NSWindow *key = [NSApp keyWindow];
|
||||
NSOpenPanel *dialog = [NSOpenPanel openPanel];
|
||||
dialog.title = @"Select Boot ROMs Folder";
|
||||
@ -30,6 +35,7 @@ char *do_open_folder_dialog(void)
|
||||
[dialog runModal];
|
||||
[key makeKeyAndOrderFront:nil];
|
||||
NSString *ret = [[[dialog URLs] firstObject] path];
|
||||
dup2(stderr_fd, STDERR_FILENO);
|
||||
if (ret) {
|
||||
return strdup(ret.UTF8String);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user