diff options
author | rubidium42 <rubidium@openttd.org> | 2021-06-12 09:10:17 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-06-13 12:45:45 +0200 |
commit | 55a11710a6c0f7942f3947711f2050c34782c39d (patch) | |
tree | 491b3009324e623236977614e91371a0ea4abac7 /src/video/cocoa | |
parent | a99ac62c1ab816ee48cac85fdf834f9fdc599cb1 (diff) | |
download | openttd-55a11710a6c0f7942f3947711f2050c34782c39d.tar.xz |
Codechange: convert printf DEBUG statements to fmt Debug statements
Diffstat (limited to 'src/video/cocoa')
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 6 | ||||
-rw-r--r-- | src/video/cocoa/cocoa_wnd.mm | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index c16d19690..2a8737333 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -363,7 +363,7 @@ bool VideoDriver_Cocoa::MakeWindow(int width, int height) unsigned int style = NSTitledWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask | NSClosableWindowMask; this->window = [ [ OTTD_CocoaWindow alloc ] initWithContentRect:contentRect styleMask:style backing:NSBackingStoreBuffered defer:NO driver:this ]; if (this->window == nil) { - DEBUG(driver, 0, "Could not create the Cocoa window."); + Debug(driver, 0, "Could not create the Cocoa window."); this->setup = false; return false; } @@ -391,7 +391,7 @@ bool VideoDriver_Cocoa::MakeWindow(int width, int height) NSRect view_frame = [ this->window contentRectForFrameRect:[ this->window frame ] ]; this->cocoaview = [ [ OTTD_CocoaView alloc ] initWithFrame:view_frame ]; if (this->cocoaview == nil) { - DEBUG(driver, 0, "Could not create the event wrapper view."); + Debug(driver, 0, "Could not create the event wrapper view."); this->setup = false; return false; } @@ -400,7 +400,7 @@ bool VideoDriver_Cocoa::MakeWindow(int width, int height) /* Create content view. */ NSView *draw_view = this->AllocateDrawView(); if (draw_view == nil) { - DEBUG(driver, 0, "Could not create the drawing view."); + Debug(driver, 0, "Could not create the drawing view."); this->setup = false; return false; } diff --git a/src/video/cocoa/cocoa_wnd.mm b/src/video/cocoa/cocoa_wnd.mm index 825130006..c0a1bb694 100644 --- a/src/video/cocoa/cocoa_wnd.mm +++ b/src/video/cocoa/cocoa_wnd.mm @@ -273,7 +273,7 @@ bool CocoaSetupApplication() /* Tell the dock about us */ OSStatus returnCode = TransformProcessType(&psn, kProcessTransformToForegroundApplication); - if (returnCode != 0) DEBUG(driver, 0, "Could not change to foreground application. Error %d", (int)returnCode); + if (returnCode != 0) Debug(driver, 0, "Could not change to foreground application. Error {}", (int)returnCode); /* Disable the system-wide tab feature as we only have one window. */ if ([ NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:) ]) { @@ -700,9 +700,9 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel if (!EditBoxInGlobalFocus() || IsInsideMM(pressed_key & ~WKC_SPECIAL_KEYS, WKC_F1, WKC_PAUSE + 1)) { HandleKeypress(pressed_key, unicode); } - DEBUG(driver, 3, "cocoa_v: QZ_KeyEvent: %x (%x), down, mapping: %x", keycode, unicode, pressed_key); + Debug(driver, 3, "cocoa_v: QZ_KeyEvent: {:x} ({:x}), down, mapping: {:x}", keycode, (int)unicode, pressed_key); } else { - DEBUG(driver, 3, "cocoa_v: QZ_KeyEvent: %x (%x), up", keycode, unicode); + Debug(driver, 3, "cocoa_v: QZ_KeyEvent: {:x} ({:x}), up", keycode, (int)unicode); } return interpret_keys; |