Skip to content

Commit

Permalink
(WASAPI) Compiles now as C++ as well as C
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Sep 28, 2017
1 parent 2af4457 commit 7d12eb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions audio/drivers/wasapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {\
Expand Down
1 change: 1 addition & 0 deletions menu/menu_animation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 7d12eb4

Please sign in to comment.