From 271490c3e1e0489bf99700c37cb70702066cbcfe Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 6 Dec 2024 02:55:43 +0000 Subject: [PATCH] snddx.cpp: use mingw-provided directx headers if applicable otherwise we get link errors like: snddx.o:snddx.cpp:(.text+0x556): undefined reference to `DXGetErrorDescription8A(long)@4' snddx.o:snddx.cpp:(.text+0x563): undefined reference to `DXGetErrorString8A(long)@4' this also gets rid of the previous workaround. --- desmume/src/frontend/windows/snddx.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/desmume/src/frontend/windows/snddx.cpp b/desmume/src/frontend/windows/snddx.cpp index 7a5a14d1e..fcfe08968 100644 --- a/desmume/src/frontend/windows/snddx.cpp +++ b/desmume/src/frontend/windows/snddx.cpp @@ -21,15 +21,11 @@ #include #include #include -#include "directx/dsound.h" - #ifdef __MINGW32__ -// I have to do this because for some reason because the dxerr8.h header is fubared -const char* __stdcall DXGetErrorString8A(HRESULT hr); -#define DXGetErrorString8 DXGetErrorString8A -const char* __stdcall DXGetErrorDescription8A(HRESULT hr); -#define DXGetErrorDescription8 DXGetErrorDescription8A +#include +#include #else +#include "directx/dsound.h" #include "directx/dxerr8.h" #endif