git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 336bc65dbfb3d6e0f77d2ca579521e0f454f34cb
parent d8a9f12a4fa4ed81f02ccc722fb9cfeb8e37f7cb
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Thu,  9 Sep 2021 00:11:49 +0300

Remove Cocoa spam from the SDL port

Diffstat:
MOpenDialog/cocoa.m6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/OpenDialog/cocoa.m b/OpenDialog/cocoa.m @@ -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); }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.