mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-04-16 21:46:03 +02:00
log: Fixed compiler warnings on 64-bit Visual Studio.
This commit is contained in:
parent
7e88e772d7
commit
ed6ce5ccb0
@ -327,7 +327,7 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
|
|||||||
#if !defined(HAVE_STDIO_H) && !defined(__WINRT__)
|
#if !defined(HAVE_STDIO_H) && !defined(__WINRT__)
|
||||||
BOOL attachResult;
|
BOOL attachResult;
|
||||||
DWORD attachError;
|
DWORD attachError;
|
||||||
unsigned long charsWritten;
|
DWORD charsWritten;
|
||||||
DWORD consoleMode;
|
DWORD consoleMode;
|
||||||
|
|
||||||
/* Maybe attach console and get stderr handle */
|
/* Maybe attach console and get stderr handle */
|
||||||
@ -376,7 +376,7 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
|
|||||||
#if !defined(HAVE_STDIO_H) && !defined(__WINRT__)
|
#if !defined(HAVE_STDIO_H) && !defined(__WINRT__)
|
||||||
/* Screen output to stderr, if console was attached. */
|
/* Screen output to stderr, if console was attached. */
|
||||||
if (consoleAttached == 1) {
|
if (consoleAttached == 1) {
|
||||||
if (!WriteConsole(stderrHandle, tstr, SDL_tcslen(tstr), &charsWritten, NULL)) {
|
if (!WriteConsole(stderrHandle, tstr, (DWORD) SDL_tcslen(tstr), &charsWritten, NULL)) {
|
||||||
OutputDebugString(TEXT("Error calling WriteConsole\r\n"));
|
OutputDebugString(TEXT("Error calling WriteConsole\r\n"));
|
||||||
if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
|
if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
|
||||||
OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
|
OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
|
||||||
@ -384,7 +384,7 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (consoleAttached == 2) {
|
} else if (consoleAttached == 2) {
|
||||||
if (!WriteFile(stderrHandle, output, SDL_strlen(output), &charsWritten, NULL)) {
|
if (!WriteFile(stderrHandle, output, (DWORD) SDL_strlen(output), &charsWritten, NULL)) {
|
||||||
OutputDebugString(TEXT("Error calling WriteFile\r\n"));
|
OutputDebugString(TEXT("Error calling WriteFile\r\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user