aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/libretro.c8
-rw-r--r--libpcsxcore/new_dynarec/new_dynarec.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c
index d834579..2964587 100644
--- a/frontend/libretro.c
+++ b/frontend/libretro.c
@@ -1341,7 +1341,9 @@ void retro_init(void)
exit(1);
}
-#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA)
+#ifdef _3DS
+ vout_buf = linearMemAlign(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2, 0x80);
+#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA)
posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
#else
vout_buf = malloc(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
@@ -1407,7 +1409,11 @@ void retro_init(void)
void retro_deinit(void)
{
SysClose();
+#ifdef _3DS
+ linearFree(vout_buf);
+#else
free(vout_buf);
+#endif
vout_buf = NULL;
}
diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c
index 487f7f0..068ca1e 100644
--- a/libpcsxcore/new_dynarec/new_dynarec.c
+++ b/libpcsxcore/new_dynarec/new_dynarec.c
@@ -55,7 +55,7 @@ static void __clear_cache(void *start, void *end) {
}
#elif defined(_3DS)
#include "3ds_utils.h"
-#define __clear_cache(start,end) ctr_flush_invalidate_cache()
+#define __clear_cache(start,end) svcFlushProcessDataCache(0xFFFF8001, start, (end)-(start))
#endif
#define MAXBLOCK 4096