ui/cocoa.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
ui/cocoa.m | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 0ef5fdf3b7a..900bc984733 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -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];
@@ -1071,7 +1071,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);
}
@@ -1080,7 +1080,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];
--
2.24.3 (Apple Git-128)
On 2/23/21 2:11 PM, Akihiko Odaki wrote: > Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> > --- > ui/cocoa.m | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/ui/cocoa.m b/ui/cocoa.m > index 0ef5fdf3b7a..900bc984733 100644 > --- a/ui/cocoa.m > +++ b/ui/cocoa.m > @@ -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]; > @@ -1071,7 +1071,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); > } > > @@ -1080,7 +1080,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]; > Alistair did this 3 years ago: https://www.mail-archive.com/qemu-devel@nongnu.org/msg484556.html but it was never merged... so: Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
© 2016 - 2025 Red Hat, Inc.