From: Glenn Date: Sun, 10 Dec 2017 12:25:01 +0000 (+1100) Subject: Fixed building for arm64 (iOS) X-Git-Tag: r24l~783^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fb0f7c5551ed450ef3ed56615e0d86f1b56739d;p=pcsx_rearmed.git Fixed building for arm64 (iOS) --- diff --git a/Makefile.libretro b/Makefile.libretro index fb136577..de818aae 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -53,6 +53,13 @@ else ifeq ($(platform), osx) fpic += -mmacosx-version-min=10.1 # iOS +else ifeq ($(platform),$(filter $(platform),ios9 ios-arm64)) + ARCH := arm64 + USE_DYNAREC = 0 + HAVE_NEON = 0 + BUILTIN_GPU = peops + TARGET := $(TARGET_NAME)_libretro_ios.dylib + else ifneq (,$(findstring ios,$(platform))) ARCH := arm USE_DYNAREC ?= 1 diff --git a/frontend/cspace.c b/frontend/cspace.c index 33a981df..26f311ff 100644 --- a/frontend/cspace.c +++ b/frontend/cspace.c @@ -34,6 +34,28 @@ void bgr555_to_rgb565(void *dst_, const void *src_, int bytes) #endif +#ifndef __ARM64__ + +void bgr888_to_rgb565(void *dst_, const void *src_, int bytes) +{ + const unsigned char *src = src_; + unsigned int *dst = dst_; + unsigned int r1, g1, b1, r2, g2, b2; + + for (; bytes >= 6; bytes -= 6, src += 6, dst++) { + r1 = src[0] & 0xf8; + g1 = src[1] & 0xfc; + b1 = src[2] & 0xf8; + r2 = src[3] & 0xf8; + g2 = src[4] & 0xfc; + b2 = src[5] & 0xf8; + *dst = (r2 << 24) | (g2 << 19) | (b2 << 13) | + (r1 << 8) | (g1 << 3) | (b1 >> 3); + } +} + +#endif + #ifndef __ARM_NEON__ void bgr888_to_rgb565(void *dst_, const void *src_, int bytes)