X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Fcspace.c;h=785b3d137e1e84a9ce944f4923b1f1cfb78ce5ac;hb=e3973c6949814717f22e3db91129829a62941232;hp=2b528a5a194473bbd2e9eaf07cf66976efb36763;hpb=d639fa7fe4be413006e13209587fa710b98820f5;p=pcsx_rearmed.git diff --git a/frontend/cspace.c b/frontend/cspace.c index 2b528a5a..785b3d13 100644 --- a/frontend/cspace.c +++ b/frontend/cspace.c @@ -8,6 +8,7 @@ * See the COPYING file in the top-level directory. */ +#include #include "cspace.h" /* @@ -30,7 +31,6 @@ || (defined(__GNUC__) && __GNUC__ >= 5)) \ && __BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ -#include #include #if defined(__ARM_NEON) || defined(__ARM_NEON__) @@ -93,7 +93,8 @@ void bgr555_to_rgb565(void * __restrict__ dst_, const void * __restrict__ src_, void bgr555_to_rgb565(void *dst_, const void *src_, int bytes) { - const unsigned int *src = src_; + // source can be misaligned, but it's very rare, so just force + const unsigned int *src = (const void *)((intptr_t)src_ & ~3); unsigned int *dst = dst_; unsigned int x, p, r, g, b;