From eab44b9e0b9dcb5cf7fa7b6851fa5454041da930 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Wed, 17 Mar 2021 21:05:49 +0100 Subject: Enable runtime dynarec enable/disable Added a more thorough cache cleanup for reset/mode-change too. Fixed the mmap initialization that ends up leaking memory. Minor x86 asm fixes for Android. --- common.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'common.h') diff --git a/common.h b/common.h index 1bfa150..ef6724a 100644 --- a/common.h +++ b/common.h @@ -31,6 +31,7 @@ #define PATH_SEPARATOR_CHAR '/' #endif +/* On x86 we pass arguments via registers instead of stack */ #ifdef X86_ARCH #define function_cc __attribute__((regparm(2))) #else @@ -55,8 +56,6 @@ // functions on PSP for vastly improved memstick performance. #ifdef PSP - #define fastcall - #include #include #include @@ -64,13 +63,8 @@ #include #include #include - - #define convert_palette(value) \ - value = ((value & 0x7FE0) << 1) | (value & 0x1F) - #include #else - typedef unsigned char u8; typedef signed char s8; typedef unsigned short int u16; @@ -79,10 +73,14 @@ typedef signed int s32; typedef unsigned long long int u64; typedef signed long long int s64; +#endif +#ifdef USE_BGR_FORMAT + #define convert_palette(value) \ + value = ((value & 0x7FE0) << 1) | (value & 0x1F) +#else #define convert_palette(value) \ value = ((value & 0x1F) << 11) | ((value & 0x03E0) << 1) | (value >> 10) - #endif #define GBA_SCREEN_WIDTH (240) -- cgit v1.2.3