diff --git a/CMakeLists.txt b/CMakeLists.txt index ebba9b953..aa558a47f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(USE_DEBUGGER ON CACHE BOOL "Whether or not to enable the ARM debugger") set(EXTRA_LIB "") file(GLOB ARM_SRC ${CMAKE_SOURCE_DIR}/src/arm/*.c) file(GLOB GBA_SRC ${CMAKE_SOURCE_DIR}/src/gba/*.c) -file(GLOB UTIL_SRC ${CMAKE_SOURCE_DIR}/src/util/*.c) +file(GLOB UTIL_SRC ${CMAKE_SOURCE_DIR}/src/util/*.[cS]) file(GLOB RENDERER_SRC ${CMAKE_SOURCE_DIR}/src/gba/renderers/video-software.c) include_directories(${CMAKE_SOURCE_DIR}/src/arm) include_directories(${CMAKE_SOURCE_DIR}/src/gba) @@ -33,6 +33,7 @@ if(BUILD_RASPI AND BUILD_EGL) set(OPENGL_INCLUDE_DIR "") add_definitions(-DBUILD_RASPI) elseif(BUILD_BBB OR BUILD_RASPI) + enable_language(ASM) add_definitions(-DCOLOR_16_BIT -DCOLOR_5_6_5) set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sw-main.c) else() diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 3eaf708cb..cae7571c0 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -407,9 +407,13 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render } #ifdef COLOR_16_BIT +#ifdef __arm__ + _to16Bit(row, softwareRenderer->row, VIDEO_HORIZONTAL_PIXELS); +#else for (x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x) { row[x] = softwareRenderer->row[x]; } +#endif #else memcpy(row, softwareRenderer->row, VIDEO_HORIZONTAL_PIXELS * sizeof(*row)); #endif