Skip to content

Commit

Permalink
ui/cocoa: Replace fprintf with error_report
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiko Odaki <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
akihikodaki authored and kraxel committed Mar 4, 2021
1 parent bc6a356 commit 4313739
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/cocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static bool bool_with_iothread_lock(BoolCodeBlock block)
static int cocoa_keycode_to_qemu(int keycode)
{
if (ARRAY_SIZE(mac_to_qkeycode_map) <= keycode) {
fprintf(stderr, "(cocoa) warning unknown keycode 0x%x\n", keycode);
error_report("(cocoa) warning unknown keycode 0x%x", keycode);
return 0;
}
return mac_to_qkeycode_map[keycode];
Expand Down Expand Up @@ -1060,7 +1060,7 @@ - (id) init
// create a view and add it to the window
cocoaView = [[QemuCocoaView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 640.0, 480.0)];
if(!cocoaView) {
fprintf(stderr, "(cocoa) can't create a view\n");
error_report("(cocoa) can't create a view");
exit(1);
}

Expand All @@ -1069,7 +1069,7 @@ - (id) init
styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskClosable
backing:NSBackingStoreBuffered defer:NO];
if(!normalWindow) {
fprintf(stderr, "(cocoa) can't create window\n");
error_report("(cocoa) can't create window");
exit(1);
}
[normalWindow setAcceptsMouseMovedEvents:YES];
Expand Down

0 comments on commit 4313739

Please sign in to comment.