From 0b7f536b486f3f411651573009c3da6063b560ea Mon Sep 17 00:00:00 2001 From: aliaspider Date: Sat, 3 Oct 2015 04:42:55 +0100 Subject: (CTR/3DS) some performance tweaks: - use linearAlloc for vout_buf. - use svcFlushProcessDataCache to flush only the required range, invalidating icache doesn't seem to be required. --- frontend/libretro.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'frontend/libretro.c') 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; } -- cgit v1.2.3