mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-30 05:17:23 +02:00
Remove newlines from log messages
This commit is contained in:
committed by
Sam Lantinga
parent
17625e20df
commit
718034f5fa
@@ -157,17 +157,17 @@ static Uint64 WIN_GetEventTimestamp(void)
|
||||
timestamp += timestamp_offset;
|
||||
if (!timestamp_offset) {
|
||||
// Initializing timestamp offset
|
||||
//SDL_Log("Initializing timestamp offset\n");
|
||||
//SDL_Log("Initializing timestamp offset");
|
||||
timestamp_offset = (now - timestamp);
|
||||
timestamp = now;
|
||||
} else if ((Sint64)(now - timestamp - TIMESTAMP_WRAP_OFFSET) >= 0) {
|
||||
// The windows message tick wrapped
|
||||
//SDL_Log("Adjusting timestamp offset for wrapping tick\n");
|
||||
//SDL_Log("Adjusting timestamp offset for wrapping tick");
|
||||
timestamp_offset += TIMESTAMP_WRAP_OFFSET;
|
||||
timestamp += TIMESTAMP_WRAP_OFFSET;
|
||||
} else if (timestamp > now) {
|
||||
// We got a newer timestamp, but it can't be newer than now, so adjust our offset
|
||||
//SDL_Log("Adjusting timestamp offset, %.2f ms newer\n", (double)(timestamp - now) / SDL_NS_PER_MS);
|
||||
//SDL_Log("Adjusting timestamp offset, %.2f ms newer", (double)(timestamp - now) / SDL_NS_PER_MS);
|
||||
timestamp_offset -= (timestamp - now);
|
||||
timestamp = now;
|
||||
}
|
||||
@@ -2239,7 +2239,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
|
||||
int w, h;
|
||||
|
||||
#ifdef HIGHDPI_DEBUG
|
||||
SDL_Log("WM_DPICHANGED: to %d\tsuggested rect: (%d, %d), (%dx%d)\n", newDPI,
|
||||
SDL_Log("WM_DPICHANGED: to %d\tsuggested rect: (%d, %d), (%dx%d)", newDPI,
|
||||
suggestedRect->left, suggestedRect->top, suggestedRect->right - suggestedRect->left, suggestedRect->bottom - suggestedRect->top);
|
||||
#endif
|
||||
|
||||
@@ -2270,7 +2270,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
|
||||
}
|
||||
|
||||
#ifdef HIGHDPI_DEBUG
|
||||
SDL_Log("WM_DPICHANGED: current SDL window size: (%dx%d)\tcalling SetWindowPos: (%d, %d), (%dx%d)\n",
|
||||
SDL_Log("WM_DPICHANGED: current SDL window size: (%dx%d)\tcalling SetWindowPos: (%d, %d), (%dx%d)",
|
||||
data->window->w, data->window->h,
|
||||
suggestedRect->left, suggestedRect->top, w, h);
|
||||
#endif
|
||||
|
||||
@@ -391,7 +391,7 @@ static void DumpKeys(const char *prefix, GameInputKeyState *keys, uint32_t count
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
char str[5];
|
||||
*SDL_UCS4ToUTF8(keys[i].codePoint, str) = '\0';
|
||||
SDL_Log(" Key 0x%.2x (%s)\n", keys[i].scanCode, str);
|
||||
SDL_Log(" Key 0x%.2x (%s)", keys[i].scanCode, str);
|
||||
}
|
||||
}
|
||||
#endif // DEBUG_KEYS
|
||||
@@ -413,7 +413,7 @@ static void GAMEINPUT_HandleKeyboardDelta(WIN_GameInputData *data, SDL_Window *w
|
||||
uint32_t num_last = IGameInputReading_GetKeyState(last_reading, max_keys, last);
|
||||
uint32_t num_keys = IGameInputReading_GetKeyState(reading, max_keys, keys);
|
||||
#ifdef DEBUG_KEYS
|
||||
SDL_Log("Timestamp: %llu\n", timestamp);
|
||||
SDL_Log("Timestamp: %llu", timestamp);
|
||||
DumpKeys("Last keys:", last, num_last);
|
||||
DumpKeys("New keys:", keys, num_keys);
|
||||
#endif
|
||||
|
||||
@@ -561,7 +561,7 @@ static void WIN_AddDisplay(SDL_VideoDevice *_this, HMONITOR hMonitor, const MONI
|
||||
float content_scale = WIN_GetContentScale(_this, hMonitor);
|
||||
|
||||
#ifdef DEBUG_MODES
|
||||
SDL_Log("Display: %s\n", WIN_StringToUTF8W(info->szDevice));
|
||||
SDL_Log("Display: %s", WIN_StringToUTF8W(info->szDevice));
|
||||
#endif
|
||||
|
||||
dxgi_output = WIN_GetDXGIOutput(_this, info->szDevice);
|
||||
|
||||
@@ -482,11 +482,11 @@ static bool WIN_VideoInit(SDL_VideoDevice *_this)
|
||||
if (SUCCEEDED(hr)) {
|
||||
data->oleinitialized = true;
|
||||
} else {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "OleInitialize() failed: 0x%.8x, using fallback drag-n-drop functionality\n", (unsigned int)hr);
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "OleInitialize() failed: 0x%.8x, using fallback drag-n-drop functionality", (unsigned int)hr);
|
||||
}
|
||||
#endif // !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
||||
} else {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "CoInitialize() failed: 0x%.8x, using fallback drag-n-drop functionality\n", (unsigned int)hr);
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "CoInitialize() failed: 0x%.8x, using fallback drag-n-drop functionality", (unsigned int)hr);
|
||||
}
|
||||
|
||||
WIN_InitDPIAwareness(_this);
|
||||
|
||||
Reference in New Issue
Block a user