aboutsummaryrefslogtreecommitdiff
path: root/frontend/libretro.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/libretro.c')
-rw-r--r--frontend/libretro.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c
index d63f126..ab85421 100644
--- a/frontend/libretro.c
+++ b/frontend/libretro.c
@@ -15,6 +15,10 @@
#include <sys/syscall.h>
#endif
+#ifdef SWITCH
+#include <switch.h>
+#endif
+
#include "../libpcsxcore/misc.h"
#include "../libpcsxcore/psxcounters.h"
#include "../libpcsxcore/psxmem_map.h"
@@ -2441,7 +2445,7 @@ void retro_init(void)
#ifdef _3DS
vout_buf = linearMemAlign(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2, 0x80);
-#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA)
+#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA) && !defined(__SWITCH__)
posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
#else
vout_buf = malloc(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);