mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-20 14:11: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 "mxdirectxinfo.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <SDL3/SDL_log.h>
|
||||||
#include <stdio.h> // for vsprintf
|
#include <stdio.h> // for vsprintf
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxAssignedDevice, 0xe4)
|
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, ...)
|
void MxDeviceEnumerate::BuildErrorString(const char* p_format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char buf[512];
|
|
||||||
|
|
||||||
va_start(args, p_format);
|
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);
|
va_end(args);
|
||||||
|
|
||||||
OutputDebugString(buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00401bf0
|
// FUNCTION: CONFIG 0x00401bf0
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
// This is the most widely used version.
|
// This is the most widely used version.
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <windows.h>
|
#include <SDL3/SDL_log.h>
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x10124cb9
|
// FUNCTION: BETA10 0x10124cb9
|
||||||
int DebugHeapState()
|
int DebugHeapState()
|
||||||
@ -19,11 +19,9 @@ int DebugHeapState()
|
|||||||
void _MxTrace(const char* format, ...)
|
void _MxTrace(const char* format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char buffer[256];
|
|
||||||
|
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
_vsnprintf(buffer, 256, format, args);
|
SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_CATEGORY_DEBUG, SDL_LOG_PRIORITY_TRACE, format, args);
|
||||||
OutputDebugString(buffer);
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
#include "mxvideomanager.h"
|
#include "mxvideomanager.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <SDL3/SDL_log.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxDisplaySurface, 0xac);
|
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);
|
m_ddSurface2->Unlock(ddsd.lpSurface);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
OutputDebugString("MxDisplaySurface::Display error\n");
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "MxDisplaySurface::Display error\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_ddSurface1->Flip(NULL, DDFLIP_WAIT);
|
m_ddSurface1->Flip(NULL, DDFLIP_WAIT);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user