mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Log mxdirectx failure using SDL_Log + E_NOINTERFACE
This commit is contained in:
parent
e3f02e3a39
commit
df2bc580a6
@ -522,6 +522,7 @@ if (ISLE_BUILD_CONFIG)
|
|||||||
target_link_libraries(config PRIVATE DirectX5::DirectX5)
|
target_link_libraries(config PRIVATE DirectX5::DirectX5)
|
||||||
endif()
|
endif()
|
||||||
target_compile_definitions(config PRIVATE DIRECT3D_VERSION=0x500)
|
target_compile_definitions(config PRIVATE DIRECT3D_VERSION=0x500)
|
||||||
|
target_link_libraries(config PRIVATE SDL3::SDL3)
|
||||||
target_link_libraries(config PRIVATE ddraw dxguid)
|
target_link_libraries(config PRIVATE ddraw dxguid)
|
||||||
set_property(TARGET config PROPERTY OUTPUT_NAME "CONFIG")
|
set_property(TARGET config PROPERTY OUTPUT_NAME "CONFIG")
|
||||||
set_property(TARGET config PROPERTY SUFFIX ".EXE")
|
set_property(TARGET config PROPERTY SUFFIX ".EXE")
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "mxdirect3d.h"
|
#include "mxdirect3d.h"
|
||||||
|
|
||||||
|
#include <SDL3/SDL.h> // for SDL_Log
|
||||||
#include <stdio.h> // for vsprintf
|
#include <stdio.h> // for vsprintf
|
||||||
|
|
||||||
#if !defined(MXDIRECTX_FOR_CONFIG)
|
#if !defined(MXDIRECTX_FOR_CONFIG)
|
||||||
@ -176,7 +177,7 @@ BOOL MxDirect3D::D3DSetMode()
|
|||||||
backBuffer->Unlock(desc.lpSurface);
|
backBuffer->Unlock(desc.lpSurface);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
OutputDebugString("MxDirect3D::D3DSetMode() back lock failed\n");
|
SDL_Log("MxDirect3D::D3DSetMode() back lock failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bFullScreen) {
|
if (m_bFullScreen) {
|
||||||
@ -194,7 +195,7 @@ BOOL MxDirect3D::D3DSetMode()
|
|||||||
frontBuffer->Unlock(desc.lpSurface);
|
frontBuffer->Unlock(desc.lpSurface);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
OutputDebugString("MxDirect3D::D3DSetMode() front lock failed\n");
|
SDL_Log("MxDirect3D::D3DSetMode() front lock failed\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -550,7 +551,7 @@ void MxDeviceEnumerate::BuildErrorString(const char* p_format, ...)
|
|||||||
vsprintf(buf, p_format, args);
|
vsprintf(buf, p_format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
OutputDebugString(buf);
|
SDL_Log("%s", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00401bf0
|
// FUNCTION: CONFIG 0x00401bf0
|
||||||
@ -639,6 +640,8 @@ const char* MxDeviceEnumerate::EnumerateErrorToString(HRESULT p_error)
|
|||||||
switch (p_error) {
|
switch (p_error) {
|
||||||
case DD_OK:
|
case DD_OK:
|
||||||
return "No error.";
|
return "No error.";
|
||||||
|
case E_NOINTERFACE:
|
||||||
|
return "No such interface supported";
|
||||||
case DDERR_GENERIC:
|
case DDERR_GENERIC:
|
||||||
return "Generic failure.";
|
return "Generic failure.";
|
||||||
case DDERR_UNSUPPORTED:
|
case DDERR_UNSUPPORTED:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user