SDL: Remove even more newlines from log messages

From 983cfe8b1cdfced8ae2d9a5ff3078a4615e2ab35 Mon Sep 17 00:00:00 2001
From: Petar Popovic <[EMAIL REDACTED]>
Date: Thu, 23 Jan 2025 18:06:29 +0100
Subject: [PATCH] Remove even more newlines from log messages

---
 src/audio/aaudio/SDL_aaudio.c              |  8 +-
 src/audio/alsa/SDL_alsa_audio.c            |  6 +-
 src/joystick/hidapi/SDL_hidapijoystick.c   |  2 +-
 src/video/kmsdrm/SDL_kmsdrmvideo.c         |  2 +-
 src/video/wayland/SDL_waylanddatamanager.c |  4 +-
 src/video/wayland/SDL_waylandevents.c      | 38 +++++-----
 src/video/windows/SDL_windowskeyboard.c    | 38 +++++-----
 src/video/windows/SDL_windowswindow.c      | 72 +++++++++---------
 test/testrumble.c                          |  2 +-
 test/testvulkan.c                          | 86 +++++++++++-----------
 10 files changed, 129 insertions(+), 129 deletions(-)

diff --git a/src/audio/aaudio/SDL_aaudio.c b/src/audio/aaudio/SDL_aaudio.c
index 8b1681b4e1086..0339a6158b375 100644
--- a/src/audio/aaudio/SDL_aaudio.c
+++ b/src/audio/aaudio/SDL_aaudio.c
@@ -102,7 +102,7 @@ static aaudio_data_callback_result_t AAUDIO_dataCallback(AAudioStream *stream, v
         size_t end = (offset + size) % hidden->mixbuf_bytes;
         SDL_assert(size <= hidden->mixbuf_bytes);
 
-//LOGI("Recorded %zu frames, %zu available, %zu max (%zu written, %zu read)\n", callback_bytes / framesize, available_bytes / framesize, hidden->mixbuf_bytes / framesize, hidden->callback_bytes / framesize, hidden->processed_bytes / framesize);
+//LOGI("Recorded %zu frames, %zu available, %zu max (%zu written, %zu read)", callback_bytes / framesize, available_bytes / framesize, hidden->mixbuf_bytes / framesize, hidden->callback_bytes / framesize, hidden->processed_bytes / framesize);
 
         if (offset <= end) {
             SDL_memcpy(&hidden->mixbuf[offset], input, size);
@@ -116,7 +116,7 @@ static aaudio_data_callback_result_t AAUDIO_dataCallback(AAudioStream *stream, v
         hidden->callback_bytes += size;
 
         if (size < callback_bytes) {
-            LOGI("Audio recording overflow, dropped %zu frames\n", (callback_bytes - size) / framesize);
+            LOGI("Audio recording overflow, dropped %zu frames", (callback_bytes - size) / framesize);
         }
     } else {
         Uint8 *output = (Uint8 *)audioData;
@@ -126,7 +126,7 @@ static aaudio_data_callback_result_t AAUDIO_dataCallback(AAudioStream *stream, v
         size_t end = (offset + size) % hidden->mixbuf_bytes;
         SDL_assert(size <= hidden->mixbuf_bytes);
 
-//LOGI("Playing %zu frames, %zu available, %zu max (%zu written, %zu read)\n", callback_bytes / framesize, available_bytes / framesize, hidden->mixbuf_bytes / framesize, hidden->processed_bytes / framesize, hidden->callback_bytes / framesize);
+//LOGI("Playing %zu frames, %zu available, %zu max (%zu written, %zu read)", callback_bytes / framesize, available_bytes / framesize, hidden->mixbuf_bytes / framesize, hidden->processed_bytes / framesize, hidden->callback_bytes / framesize);
 
         SDL_MemoryBarrierAcquire();
         if (offset <= end) {
@@ -139,7 +139,7 @@ static aaudio_data_callback_result_t AAUDIO_dataCallback(AAudioStream *stream, v
         hidden->callback_bytes += size;
 
         if (size < callback_bytes) {
-            LOGI("Audio playback underflow, missed %zu frames\n", (callback_bytes - size) / framesize);
+            LOGI("Audio playback underflow, missed %zu frames", (callback_bytes - size) / framesize);
             SDL_memset(&output[size], device->silence_value, (callback_bytes - size));
         }
     }
diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
index 652a1a5cfa417..633e36440adbb 100644
--- a/src/audio/alsa/SDL_alsa_audio.c
+++ b/src/audio/alsa/SDL_alsa_audio.c
@@ -923,7 +923,7 @@ static int ALSA_pcm_cfg_hw_chans_n_scan(struct ALSA_pcm_cfg_ctx *ctx, unsigned i
             return CHANS_N_NOT_CONFIGURED;
         }
 
-        LOGDEBUG("target chans_n is %u\n", target_chans_n);
+        LOGDEBUG("target chans_n is %u", target_chans_n);
 
         int status = ALSA_snd_pcm_hw_params_any(ctx->device->hidden->pcm, ctx->hwparams);
         if (status < 0) {
@@ -1050,7 +1050,7 @@ static int ALSA_pcm_cfg_hw_chans_n_scan(struct ALSA_pcm_cfg_ctx *ctx, unsigned i
 
 static bool ALSA_pcm_cfg_hw(struct ALSA_pcm_cfg_ctx *ctx)
 {
-    LOGDEBUG("target chans_n, equal or above requested chans_n mode\n");
+    LOGDEBUG("target chans_n, equal or above requested chans_n mode");
     int status = ALSA_pcm_cfg_hw_chans_n_scan(ctx, CHANS_N_SCAN_MODE__EQUAL_OR_ABOVE_REQUESTED_CHANS_N);
     if (status < 0) {  // something went too wrong
         return false;
@@ -1059,7 +1059,7 @@ static bool ALSA_pcm_cfg_hw(struct ALSA_pcm_cfg_ctx *ctx)
     }
 
     // Here, status == CHANS_N_NOT_CONFIGURED
-    LOGDEBUG("target chans_n, below requested chans_n mode\n");
+    LOGDEBUG("target chans_n, below requested chans_n mode");
     status = ALSA_pcm_cfg_hw_chans_n_scan(ctx, CHANS_N_SCAN_MODE__BELOW_REQUESTED_CHANS_N);
     if (status < 0) { // something went too wrong
         return false;
diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c
index d1f34eef6a729..30bae026fd325 100644
--- a/src/joystick/hidapi/SDL_hidapijoystick.c
+++ b/src/joystick/hidapi/SDL_hidapijoystick.c
@@ -458,7 +458,7 @@ static void HIDAPI_SetupDeviceDriver(SDL_HIDAPI_Device *device, bool *removed) S
 
             if (dev == NULL) {
                 SDL_LogDebug(SDL_LOG_CATEGORY_INPUT,
-                             "HIDAPI_SetupDeviceDriver() couldn't open %s: %s\n",
+                             "HIDAPI_SetupDeviceDriver() couldn't open %s: %s",
                              device->path, SDL_GetError());
                 return;
             }
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index 1d25b8d0f0742..a6f3730a6a212 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -163,7 +163,7 @@ static int get_driindex(void)
                 close(drm_fd);
             } else {
                 SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO,
-                             "Failed to open KMSDRM device %s, errno: %d\n", device, errno);
+                             "Failed to open KMSDRM device %s, errno: %d", device, errno);
             }
         }
     }
diff --git a/src/video/wayland/SDL_waylanddatamanager.c b/src/video/wayland/SDL_waylanddatamanager.c
index 8c75e3d06d41a..d9b1b91e6c55c 100644
--- a/src/video/wayland/SDL_waylanddatamanager.c
+++ b/src/video/wayland/SDL_waylanddatamanager.c
@@ -382,7 +382,7 @@ void *Wayland_data_offer_receive(SDL_WaylandDataOffer *offer,
         close(pipefd[0]);
     }
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In Wayland_data_offer_receive for '%s', buffer (%ld) at %p\n",
+                 ". In Wayland_data_offer_receive for '%s', buffer (%ld) at %p",
                  mime_type, *length, buffer);
     return buffer;
 }
@@ -418,7 +418,7 @@ void *Wayland_primary_selection_offer_receive(SDL_WaylandPrimarySelectionOffer *
         close(pipefd[0]);
     }
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In Wayland_primary_selection_offer_receive for '%s', buffer (%ld) at %p\n",
+                 ". In Wayland_primary_selection_offer_receive for '%s', buffer (%ld) at %p",
                  mime_type, *length, buffer);
     return buffer;
 }
diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c
index c6260b863bfb9..c63721ec3d92a 100644
--- a/src/video/wayland/SDL_waylandevents.c
+++ b/src/video/wayland/SDL_waylandevents.c
@@ -2179,7 +2179,7 @@ static void data_offer_handle_offer(void *data, struct wl_data_offer *wl_data_of
     SDL_WaylandDataOffer *offer = data;
     Wayland_data_offer_add_mime(offer, mime_type);
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In wl_data_offer_listener . data_offer_handle_offer on data_offer 0x%08x for MIME '%s'\n",
+                 ". In wl_data_offer_listener . data_offer_handle_offer on data_offer 0x%08x for MIME '%s'",
                  (wl_data_offer ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)wl_data_offer) : -1),
                  mime_type);
 }
@@ -2188,7 +2188,7 @@ static void data_offer_handle_source_actions(void *data, struct wl_data_offer *w
                                              uint32_t source_actions)
 {
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In wl_data_offer_listener . data_offer_handle_source_actions on data_offer 0x%08x for Source Actions '%d'\n",
+                 ". In wl_data_offer_listener . data_offer_handle_source_actions on data_offer 0x%08x for Source Actions '%d'",
                  (wl_data_offer ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)wl_data_offer) : -1),
                  source_actions);
 }
@@ -2197,7 +2197,7 @@ static void data_offer_handle_actions(void *data, struct wl_data_offer *wl_data_
                                       uint32_t dnd_action)
 {
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In wl_data_offer_listener . data_offer_handle_actions on data_offer 0x%08x for DND Actions '%d'\n",
+                 ". In wl_data_offer_listener . data_offer_handle_actions on data_offer 0x%08x for DND Actions '%d'",
                  (wl_data_offer ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)wl_data_offer) : -1),
                  dnd_action);
 }
@@ -2214,7 +2214,7 @@ static void primary_selection_offer_handle_offer(void *data, struct zwp_primary_
     SDL_WaylandPrimarySelectionOffer *offer = data;
     Wayland_primary_selection_offer_add_mime(offer, mime_type);
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In zwp_primary_selection_offer_v1_listener . primary_selection_offer_handle_offer on primary_selection_offer 0x%08x for MIME '%s'\n",
+                 ". In zwp_primary_selection_offer_v1_listener . primary_selection_offer_handle_offer on primary_selection_offer 0x%08x for MIME '%s'",
                  (zwp_primary_selection_offer_v1 ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)zwp_primary_selection_offer_v1) : -1),
                  mime_type);
 }
@@ -2234,7 +2234,7 @@ static void data_device_handle_data_offer(void *data, struct wl_data_device *wl_
         wl_data_offer_set_user_data(id, data_offer);
         wl_data_offer_add_listener(id, &data_offer_listener, data_offer);
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In wl_data_device_listener . data_device_handle_data_offer on data_offer 0x%08x\n",
+                     ". In wl_data_device_listener . data_device_handle_data_offer on data_offer 0x%08x",
                      (id ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)id) : -1));
     }
 }
@@ -2292,25 +2292,25 @@ static void data_device_handle_enter(void *data, struct wl_data_device *wl_data_
                 const float dy = (float)wl_fixed_to_double(y);
                 SDL_SendDropPosition(data_device->dnd_window, dx, dy);
                 SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                             ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d into window %d for serial %d\n",
+                             ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d into window %d for serial %d",
                              WAYLAND_wl_proxy_get_id((struct wl_proxy *)id),
                              wl_fixed_to_int(x), wl_fixed_to_int(y), SDL_GetWindowID(data_device->dnd_window), serial);
             } else {
                 data_device->dnd_window = NULL;
                 SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                             ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d for serial %d\n",
+                             ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d for serial %d",
                              WAYLAND_wl_proxy_get_id((struct wl_proxy *)id),
                              wl_fixed_to_int(x), wl_fixed_to_int(y), serial);
             }
         } else {
             SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                         ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d for serial %d\n",
+                         ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d for serial %d",
                          WAYLAND_wl_proxy_get_id((struct wl_proxy *)id),
                          wl_fixed_to_int(x), wl_fixed_to_int(y), serial);
         }
     } else {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d for serial %d\n",
+                     ". In wl_data_device_listener . data_device_handle_enter on data_offer 0x%08x at %d x %d for serial %d",
                      -1, wl_fixed_to_int(x), wl_fixed_to_int(y), serial);
     }
 }
@@ -2323,12 +2323,12 @@ static void data_device_handle_leave(void *data, struct wl_data_device *wl_data_
         if (data_device->dnd_window) {
             SDL_SendDropComplete(data_device->dnd_window);
             SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                         ". In wl_data_device_listener . data_device_handle_leave on data_offer 0x%08x from window %d for serial %d\n",
+                         ". In wl_data_device_listener . data_device_handle_leave on data_offer 0x%08x from window %d for serial %d",
                          WAYLAND_wl_proxy_get_id((struct wl_proxy *)data_device->drag_offer->offer),
                          SDL_GetWindowID(data_device->dnd_window), data_device->drag_serial);
         } else {
             SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                         ". In wl_data_device_listener . data_device_handle_leave on data_offer 0x%08x for serial %d\n",
+                         ". In wl_data_device_listener . data_device_handle_leave on data_offer 0x%08x for serial %d",
                          WAYLAND_wl_proxy_get_id((struct wl_proxy *)data_device->drag_offer->offer),
                          data_device->drag_serial);
         }
@@ -2336,7 +2336,7 @@ static void data_device_handle_leave(void *data, struct wl_data_device *wl_data_
         data_device->drag_offer = NULL;
     } else {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In wl_data_device_listener . data_device_handle_leave on data_offer 0x%08x for serial %d\n",
+                     ". In wl_data_device_listener . data_device_handle_leave on data_offer 0x%08x for serial %d",
                      -1, -1);
     }
     data_device->has_mime_file = false;
@@ -2358,13 +2358,13 @@ static void data_device_handle_motion(void *data, struct wl_data_device *wl_data
          */
         SDL_SendDropPosition(data_device->dnd_window, dx, dy);
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In wl_data_device_listener . data_device_handle_motion on data_offer 0x%08x at %d x %d in window %d serial %d\n",
+                     ". In wl_data_device_listener . data_device_handle_motion on data_offer 0x%08x at %d x %d in window %d serial %d",
                      WAYLAND_wl_proxy_get_id((struct wl_proxy *)data_device->drag_offer->offer),
                      wl_fixed_to_int(x), wl_fixed_to_int(y),
                      SDL_GetWindowID(data_device->dnd_window), data_device->drag_serial);
     } else {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In wl_data_device_listener . data_device_handle_motion on data_offer 0x%08x at %d x %d serial %d\n",
+                     ". In wl_data_device_listener . data_device_handle_motion on data_offer 0x%08x at %d x %d serial %d",
                      -1, wl_fixed_to_int(x), wl_fixed_to_int(y), -1);
     }
 }
@@ -2375,7 +2375,7 @@ static void data_device_handle_drop(void *data, struct wl_data_device *wl_data_d
 
     if (data_device->drag_offer && data_device->dnd_window && (data_device->has_mime_file || data_device->has_mime_text)) {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In wl_data_device_listener . data_device_handle_drop on data_offer 0x%08x in window %d serial %d\n",
+                     ". In wl_data_device_listener . data_device_handle_drop on data_offer 0x%08x in window %d serial %d",
                      WAYLAND_wl_proxy_get_id((struct wl_proxy *)data_device->drag_offer->offer),
                      SDL_GetWindowID(data_device->dnd_window), data_device->drag_serial);
         // TODO: SDL Support more mime types
@@ -2457,7 +2457,7 @@ static void data_device_handle_drop(void *data, struct wl_data_device *wl_data_d
         }
     } else {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In wl_data_device_listener . data_device_handle_drop on data_offer 0x%08x serial %d\n",
+                     ". In wl_data_device_listener . data_device_handle_drop on data_offer 0x%08x serial %d",
                      -1, -1);
     }
 
@@ -2511,7 +2511,7 @@ static void data_device_handle_selection(void *data, struct wl_data_device *wl_d
     }
 
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In data_device_listener . data_device_handle_selection on data_offer 0x%08x\n",
+                 ". In data_device_listener . data_device_handle_selection on data_offer 0x%08x",
                  (id ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)id) : -1));
     if (data_device->selection_offer != offer) {
         Wayland_data_offer_destroy(data_device->selection_offer);
@@ -2542,7 +2542,7 @@ static void primary_selection_device_handle_offer(void *data, struct zwp_primary
         zwp_primary_selection_offer_v1_add_listener(id, &primary_selection_offer_listener, primary_selection_offer);
     }
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In zwp_primary_selection_device_v1_listener . primary_selection_device_handle_offer on primary_selection_offer 0x%08x\n",
+                 ". In zwp_primary_selection_device_v1_listener . primary_selection_device_handle_offer on primary_selection_offer 0x%08x",
                  (id ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)id) : -1));
 }
 
@@ -2561,7 +2561,7 @@ static void primary_selection_device_handle_selection(void *data, struct zwp_pri
         primary_selection_device->selection_offer = offer;
     }
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In zwp_primary_selection_device_v1_listener . primary_selection_device_handle_selection on primary_selection_offer 0x%08x\n",
+                 ". In zwp_primary_selection_device_v1_listener . primary_selection_device_handle_selection on primary_selection_offer 0x%08x",
                  (id ? WAYLAND_wl_proxy_get_id((struct wl_proxy *)id) : -1));
 
     notifyFromMimes(offer ? &offer->mimes : NULL);
diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index 5f934e021ee0c..75e8ad4a2895b 100644
--- a/src/video/windows/SDL_windowskeyboard.c
+++ b/src/video/windows/SDL_windowskeyboard.c
@@ -741,7 +741,7 @@ static void IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD
     videodata->ime_cursor = LOWORD(ImmGetCompositionStringW(himc, GCS_CURSORPOS, 0, 0));
     videodata->ime_selected_start = 0;
     videodata->ime_selected_length = 0;
-    SDL_DebugIMELog("Cursor = %d\n", videodata->ime_cursor);
+    SDL_DebugIMELog("Cursor = %d", videodata->ime_cursor);
 
     length = ImmGetCompositionStringW(himc, string, NULL, 0);
     if (length > 0 && videodata->ime_composition_length < length) {
@@ -786,7 +786,7 @@ static void IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD
             }
 
             for (LONG i = 0; i < length; ++i) {
-                SDL_DebugIMELog("attrib[%d] = %d\n", i, attributes[i]);
+                SDL_DebugIMELog("attrib[%d] = %d", i, attributes[i]);
             }
 
             for (start = 0; start < length; ++start) {
@@ -987,7 +987,7 @@ bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SD
     HIMC himc = 0;
 
     if (msg == WM_IME_SETCONTEXT) {
-        SDL_DebugIMELog("WM_IME_SETCONTEXT\n");
+        SDL_DebugIMELog("WM_IME_SETCONTEXT");
 
         LPARAM element_mask;
         if (videodata->ime_internal_composition && videodata->ime_internal_candidates) {
@@ -1013,35 +1013,35 @@ bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SD
     switch (msg) {
     case WM_KEYDOWN:
         if (wParam == VK_PROCESSKEY) {
-            SDL_DebugIMELog("WM_KEYDOWN VK_PROCESSKEY\n");
+            SDL_DebugIMELog("WM_KEYDOWN VK_PROCESSKEY");
             trap = true;
         } else {
-            SDL_DebugIMELog("WM_KEYDOWN normal\n");
+            SDL_DebugIMELog("WM_KEYDOWN normal");
         }
         break;
     case WM_INPUTLANGCHANGE:
-        SDL_DebugIMELog("WM_INPUTLANGCHANGE\n");
+        SDL_DebugIMELog("WM_INPUTLANGCHANGE");
         IME_InputLangChanged(videodata);
         break;
     case WM_IME_STARTCOMPOSITION:
-        SDL_DebugIMELog("WM_IME_STARTCOMPOSITION\n");
+        SDL_DebugIMELog("WM_IME_STARTCOMPOSITION");
         if (videodata->ime_internal_composition) {
             trap = true;
         }
         break;
     case WM_IME_COMPOSITION:
-        SDL_DebugIMELog("WM_IME_COMPOSITION %x\n", lParam);
+        SDL_DebugIMELog("WM_IME_COMPOSITION %x", lParam);
         if (videodata->ime_internal_composition) {
             trap = true;
             himc = ImmGetContext(hwnd);
             if (*lParam & GCS_RESULTSTR) {
-                SDL_DebugIMELog("GCS_RESULTSTR\n");
+                SDL_DebugIMELog("GCS_RESULTSTR");
                 IME_GetCompositionString(videodata, himc, GCS_RESULTSTR);
                 IME_SendClearComposition(videodata);
                 IME_SendInputEvent(videodata);
             }
             if (*lParam & GCS_COMPSTR) {
-                SDL_DebugIMELog("GCS_COMPSTR\n");
+                SDL_DebugIMELog("GCS_COMPSTR");
                 videodata->ime_readingstring[0] = 0;
                 IME_GetCompositionString(videodata, himc, GCS_COMPSTR);
                 IME_SendEditingEvent(videodata);
@@ -1050,7 +1050,7 @@ bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SD
         }
         break;
     case WM_IME_ENDCOMPOSITION:
-        SDL_DebugIMELog("WM_IME_ENDCOMPOSITION\n");
+        SDL_DebugIMELog("WM_IME_ENDCOMPOSITION");
         if (videodata->ime_internal_composition) {
             trap = true;
             videodata->ime_composition[0] = 0;
@@ -1062,32 +1062,32 @@ bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SD
         }
         break;
     case WM_IME_NOTIFY:
-        SDL_DebugIMELog("WM_IME_NOTIFY %x\n", wParam);
+        SDL_DebugIMELog("WM_IME_NOTIFY %x", wParam);
         switch (wParam) {
         case IMN_SETCOMPOSITIONWINDOW:
-            SDL_DebugIMELog("IMN_SETCOMPOSITIONWINDOW\n");
+            SDL_DebugIMELog("IMN_SETCOMPOSITIONWINDOW");
             break;
         case IMN_SETCOMPOSITIONFONT:
-            SDL_DebugIMELog("IMN_SETCOMPOSITIONFONT\n");
+            SDL_DebugIMELog("IMN_SETCOMPOSITIONFONT");
             break;
         case IMN_SETCANDIDATEPOS:
-            SDL_DebugIMELog("IMN_SETCANDIDATEPOS\n");
+            SDL_DebugIMELog("IMN_SETCANDIDATEPOS");
             break;
         case IMN_SETCONVERSIONMODE:
         case IMN_SETOPENSTATUS:
-            SDL_DebugIMELog("%s\n", wParam == IMN_SETCONVERSIONMODE ? "IMN_SETCONVERSIONMODE" : "IMN_SETOPENSTATUS");
+            SDL_DebugIMELog("%s", wParam == IMN_SETCONVERSIONMODE ? "IMN_SETCONVERSIONMODE" : "IMN_SETOPENSTATUS");
             IME_UpdateInputLocale(videodata);
             break;
         case IMN_OPENCANDIDATE:
         case IMN_CHANGECANDIDATE:
-            SDL_DebugIMELog("%s\n", wParam == IMN_OPENCANDIDATE ? "IMN_OPENCANDIDATE" : "IMN_CHANGECANDIDATE");
+            SDL_DebugIMELog("%s", wParam == IMN_OPENCANDIDATE ? "IMN_OPENCANDIDATE" : "IMN_CHANGECANDIDATE");
             if (videodata->ime_internal_candidates) {
                 trap = true;
                 videodata->ime_update_candidates = true;
             }
             break;
         case IMN_CLOSECANDIDATE:
-            SDL_DebugIMELog("IMN_CLOSECANDIDATE\n");
+            SDL_DebugIMELog("IMN_CLOSECANDIDATE");
             if (videodata->ime_internal_candidates) {
                 trap = true;
                 videodata->ime_update_candidates = false;
@@ -1097,7 +1097,7 @@ bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SD
         case IMN_PRIVATE:
         {
             DWORD dwId = IME_GetId(videodata, 0);
-            SDL_DebugIMELog("IMN_PRIVATE %u\n", dwId);
+            SDL_DebugIMELog("IMN_PRIVATE %u", dwId);
             IME_GetReadingString(videodata, hwnd);
             switch (dwId) {
             case IMEID_CHT_VER42:
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 1711fc0a597c0..bb3f3cf6907ab 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -1862,16 +1862,16 @@ static STDMETHODIMP SDLDropTarget_DragEnter(SDLDropTarget *target,
                                             POINTL pt, DWORD *pdwEffect)
 {
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In DragEnter at %ld, %ld\n", pt.x, pt.y);
+                 ". In DragEnter at %ld, %ld", pt.x, pt.y);
     *pdwEffect = DROPEFFECT_COPY;
     POINT pnt = { pt.x, pt.y };
     if (ScreenToClient(target->hwnd, &pnt)) {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In DragEnter at %ld, %ld => window %u at %ld, %ld\n", pt.x, pt.y, target->window->id, pnt.x, pnt.y);
+                     ". In DragEnter at %ld, %ld => window %u at %ld, %ld", pt.x, pt.y, target->window->id, pnt.x, pnt.y);
         SDL_SendDropPosition(target->window, pnt.x, pnt.y);
     } else {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In DragEnter at %ld, %ld => nil, nil\n", pt.x, pt.y);
+                     ". In DragEnter at %ld, %ld => nil, nil", pt.x, pt.y);
     }
     return S_OK;
 }
@@ -1881,16 +1881,16 @@ static STDMETHODIMP SDLDropTarget_DragOver(SDLDropTarget *target,
                                            POINTL pt, DWORD *pdwEffect)
 {
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In DragOver at %ld, %ld\n", pt.x, pt.y);
+                 ". In DragOver at %ld, %ld", pt.x, pt.y);
     *pdwEffect = DROPEFFECT_COPY;
     POINT pnt = { pt.x, pt.y };
     if (ScreenToClient(target->hwnd, &pnt)) {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In DragOver at %ld, %ld => window %u at %ld, %ld\n", pt.x, pt.y, target->window->id, pnt.x, pnt.y);
+                     ". In DragOver at %ld, %ld => window %u at %ld, %ld", pt.x, pt.y, target->window->id, pnt.x, pnt.y);
         SDL_SendDropPosition(target->window, pnt.x, pnt.y);
     } else {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In DragOver at %ld, %ld => nil, nil\n", pt.x, pt.y);
+                     ". In DragOver at %ld, %ld => nil, nil", pt.x, pt.y);
     }
     return S_OK;
 }
@@ -1898,7 +1898,7 @@ static STDMETHODIMP SDLDropTarget_DragOver(SDLDropTarget *target,
 static STDMETHODIMP SDLDropTarget_DragLeave(SDLDropTarget *target)
 {
     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                 ". In DragLeave\n");
+                 ". In DragLeave");
     SDL_SendDropComplete(target->window);
     return S_OK;
 }
@@ -1911,11 +1911,11 @@ static STDMETHODIMP SDLDropTarget_Drop(SDLDropTarget *target,
     POINT pnt = { pt.x, pt.y };
     if (ScreenToClient(target->hwnd, &pnt)) {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In Drop at %ld, %ld => window %u at %ld, %ld\n", pt.x, pt.y, target->window->id, pnt.x, pnt.y);
+                     ". In Drop at %ld, %ld => window %u at %ld, %ld", pt.x, pt.y, target->window->id, pnt.x, pnt.y);
         SDL_SendDropPosition(target->window, pnt.x, pnt.y);
     } else {
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In Drop at %ld, %ld => nil, nil\n", pt.x, pt.y);
+                     ". In Drop at %ld, %ld => nil, nil", pt.x, pt.y);
     }
 
     {
@@ -1923,7 +1923,7 @@ static STDMETHODIMP SDLDropTarget_Drop(SDLDropTarget *target,
         HRESULT hres;
         hres = pDataObject->lpVtbl->EnumFormatEtc(pDataObject, DATADIR_GET, &pEnumFormatEtc);
         SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                     ". In Drop for EnumFormatEtc, HRESULT is %08lx\n", hres);
+                     ". In Drop for EnumFormatEtc, HRESULT is %08lx", hres);
         if (hres == S_OK) {
             FORMATETC fetc;
             while (pEnumFormatEtc->lpVtbl->Next(pEnumFormatEtc, 1, &fetc, NULL) == S_OK) {
@@ -1931,10 +1931,10 @@ static STDMETHODIMP SDLDropTarget_Drop(SDLDropTarget *target,
                 const char *cfnm = SDLGetClipboardFormatName(fetc.cfFormat, name, 256);
                 if (cfnm) {
                     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                                 ". In Drop, Supported format is %08x, '%s'\n", fetc.cfFormat, cfnm);
+                                 ". In Drop, Supported format is %08x, '%s'", fetc.cfFormat, cfnm);
                 } else {
                     SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                                 ". In Drop, Supported format is %08x, Predefined\n", fetc.cfFormat);
+                                 ". In Drop, Supported format is %08x, Predefined", fetc.cfFormat);
                 }
             }
         }
@@ -1950,18 +1950,18 @@ static STDMETHODIMP SDLDropTarget_Drop(SDLDropTarget *target,
         const char *format_mime = "text/uri-list";
         if (SUCCEEDED(pDataObject->lpVtbl->QueryGetData(pDataObject, &fetc))) {
             SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                         ". In Drop File for QueryGetData, format %08x '%s', success\n",
+                         ". In Drop File for QueryGetData, format %08x '%s', success",
                          fetc.cfFormat, format_mime);
             STGMEDIUM med;
             HRESULT hres = pDataObject->lpVtbl->GetData(pDataObject, &fetc, &med);
             SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                         ". In Drop File for      GetData, format %08x '%s', HRESULT is %08lx\n",
+                         ". In Drop File for      GetData, format %08x '%s', HRESULT is %08lx",
                          fetc.cfFormat, format_mime, hres);
             if (SUCCEEDED(hres)) {
                 const size_t bsize = GlobalSize(med.hGlobal);
                 const void *buffer = (void *)GlobalLock(med.hGlobal);
                 SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                             ". In Drop File for   GlobalLock, format %08x '%s', memory (%lu) %p\n",
+                             ". In Drop File for   GlobalLock, format %08x '%s', memory (%lu) %p",
                              fetc.cfFormat, format_mime, (unsigned long)bsize, buffer);
                 if (buffer) {
                     char *text = (char *)SDL_malloc(bsize + sizeof(Uint32));
@@ -1972,7 +1972,7 @@ static STDMETHODIMP SDLDropTarget_Drop(SDLDropTarget *target,
                     while (token != NULL) {
                         if (SDL_URIToLocal(token, token) >= 0) {
                             SDL_LogTrace(SDL_LOG_CATEGORY_INPUT,
-                                         ". In Drop File, file (%lu of %lu) '%s'\n",
+                                         ". In Drop File, file (%lu of %lu) '%s'",
      

(Patch may be truncated, please check the link at the top of this post.)