(WASAPI) Compiles now as C++ as well as C

This commit is contained in:
twinaphex 2017-09-28 18:47:33 +02:00
parent 2af4457bec
commit 7d12eb4a51
2 changed files with 12 additions and 2 deletions

View File

@ -64,12 +64,21 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0
wasapi_sys_err(fun_str);\
err_exp; }
#define WASAPI_RELEASE(iface)\
#ifdef __cplusplus
#define WASAPI_RELEASE(iface) \
if(iface) \
{ \
iface->Release();\
iface = NULL; \
}
#else
#define WASAPI_RELEASE(iface) \
if(iface) \
{ \
iface->lpVtbl->Release(iface);\
iface = NULL; \
} \
}
#endif
#define WASAPI_FREE(ptr)\
if(ptr) {\

View File

@ -19,6 +19,7 @@
#include <compat/strl.h>
#include <encodings/utf.h>
#include <retro_math.h>
#include <retro_miscellaneous.h>
#include <features/features_cpu.h>