mirror of https://github.com/mgba-emu/mgba.git
Fast 32-to-16-bit memory conversion routine on ARM
This commit is contained in:
parent
95b6cc9b00
commit
53dd260b3e
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue