[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/8] ui/cocoa: Replace fprintf with error_report
From: |
Gerd Hoffmann |
Subject: |
[PULL 5/8] ui/cocoa: Replace fprintf with error_report |
Date: |
Thu, 4 Mar 2021 09:37:02 +0100 |
From: Akihiko Odaki <akihiko.odaki@gmail.com>
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210223131106.21166-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/cocoa.m | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 6a59f87316b8..f27beb30e6ef 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -270,7 +270,7 @@ const int mac_to_qkeycode_map[] = {
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];
@@ -1060,7 +1060,7 @@ QemuCocoaView *cocoaView;
// 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);
}
@@ -1069,7 +1069,7 @@ QemuCocoaView *cocoaView;
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];
--
2.29.2
- [PULL 0/8] Ui 20210304 patches, Gerd Hoffmann, 2021/03/04
- [PULL 1/8] ui/cocoa: Remove the uses of full screen APIs, Gerd Hoffmann, 2021/03/04
- [PULL 2/8] ui/gtk: vte: fix sending multiple characeters, Gerd Hoffmann, 2021/03/04
- [PULL 6/8] ui/console: Add placeholder flag to message surface, Gerd Hoffmann, 2021/03/04
- [PULL 3/8] ui/cocoa: Fix stride resolution of pixman image, Gerd Hoffmann, 2021/03/04
- [PULL 4/8] configure: Improve OpenGL dependency detections, Gerd Hoffmann, 2021/03/04
- [PULL 5/8] ui/cocoa: Replace fprintf with error_report,
Gerd Hoffmann <=
- [PULL 7/8] ui/console: Pass placeholder surface to displays, Gerd Hoffmann, 2021/03/04
- [PULL 8/8] virtio-gpu: Do not distinguish the primary console, Gerd Hoffmann, 2021/03/04
- Re: [PULL 0/8] Ui 20210304 patches, Peter Maydell, 2021/03/05