- use linearAlloc for vout_buf.
- use svcFlushProcessDataCache to flush only the required range,
invalidating icache doesn't seem to be required.
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);
void retro_deinit(void)
{
SysClose();
+#ifdef _3DS
+ linearFree(vout_buf);
+#else
free(vout_buf);
+#endif
vout_buf = NULL;
}
}
#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