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.
This commit is contained in:
rofl0r 2024-12-06 02:55:43 +00:00
parent 6323bbb6c0
commit 271490c3e1
1 changed files with 3 additions and 7 deletions

View File

@ -21,15 +21,11 @@
#include <stdio.h>
#include <windows.h>
#include <mmsystem.h>
#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 <dsound.h>
#include <dxerr8.h>
#else
#include "directx/dsound.h"
#include "directx/dxerr8.h"
#endif