mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 10:31:16 +00:00
Use SDL_LogXXX instead of OutputDebugString
This commit is contained in:
parent
ad471494e0
commit
a8ad005d42
@ -1,6 +1,7 @@
|
||||
#include "mxdirectxinfo.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <SDL3/SDL_log.h>
|
||||
#include <stdio.h> // for vsprintf
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxAssignedDevice, 0xe4)
|
||||
@ -260,13 +261,10 @@ BOOL MxDeviceEnumerate::EnumDirectDrawCallback(LPGUID p_guid, LPSTR p_driverDesc
|
||||
void MxDeviceEnumerate::BuildErrorString(const char* p_format, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[512];
|
||||
|
||||
va_start(args, p_format);
|
||||
vsprintf(buf, p_format, args);
|
||||
SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_ERROR, p_format, args);
|
||||
va_end(args);
|
||||
|
||||
OutputDebugString(buf);
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00401bf0
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
// This is the most widely used version.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <SDL3/SDL_log.h>
|
||||
|
||||
// FUNCTION: BETA10 0x10124cb9
|
||||
int DebugHeapState()
|
||||
@ -19,11 +19,9 @@ int DebugHeapState()
|
||||
void _MxTrace(const char* format, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buffer[256];
|
||||
|
||||
va_start(args, format);
|
||||
_vsnprintf(buffer, 256, format, args);
|
||||
OutputDebugString(buffer);
|
||||
SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_CATEGORY_DEBUG, SDL_LOG_PRIORITY_TRACE, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#include "mxvideomanager.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <SDL3/SDL_log.h>
|
||||
#include <windows.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxDisplaySurface, 0xac);
|
||||
@ -834,7 +835,7 @@ void MxDisplaySurface::Display(MxS32 p_left, MxS32 p_top, MxS32 p_left2, MxS32 p
|
||||
m_ddSurface2->Unlock(ddsd.lpSurface);
|
||||
}
|
||||
else {
|
||||
OutputDebugString("MxDisplaySurface::Display error\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "MxDisplaySurface::Display error\n");
|
||||
}
|
||||
}
|
||||
m_ddSurface1->Flip(NULL, DDFLIP_WAIT);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user