decomp: fix warnings on MinGW

This commit is contained in:
Marcin Kurczewski 2024-06-12 10:45:50 +02:00
parent 37c2d929a7
commit 38bf87d282
No known key found for this signature in database
GPG Key ID: CC65E6FD28CAE42A
2 changed files with 11 additions and 2 deletions

View File

@ -2115,7 +2115,7 @@ void __cdecl Enumerate3DDevices(DISPLAY_ADAPTER *const adapter)
{
if (D3DCreate()) {
g_D3D->lpVtbl->EnumDevices(
g_D3D, Enum3DDevicesCallback, (LPVOID)adapter);
g_D3D, (void *)Enum3DDevicesCallback, (LPVOID)adapter);
D3DRelease();
}
}
@ -2492,7 +2492,8 @@ BOOL WINAPI EnumDisplayAdaptersCallback(
DDCAPS_DX5 driver_caps = { .dwSize = sizeof(DDCAPS_DX5), 0 };
DDCAPS_DX5 hel_caps = { .dwSize = sizeof(DDCAPS_DX5), 0 };
if (FAILED(g_DDraw->lpVtbl->GetCaps(g_DDraw, &driver_caps, &hel_caps))) {
if (FAILED(g_DDraw->lpVtbl->GetCaps(
g_DDraw, (void *)&driver_caps, (void *)&hel_caps))) {
goto cleanup;
}

View File

@ -2,10 +2,18 @@
#include <windows.h>
#ifdef DirectDrawCreate
#undef DirectDrawCreate
#endif
#define DirectDrawCreate \
((HRESULT(__stdcall *)( \
GUID * driver_guid, LPDIRECTDRAW * ddraw, LPUNKNOWN outer))0x00458CF4)
#ifdef DirectDrawEnumerate
#undef DirectDrawEnumerate
#endif
#define DirectDrawEnumerate \
((HRESULT(__stdcall *)( \
LPDDENUMCALLBACKA lpCallback, LPVOID lpContext))0x00458CFA)