all repos — mgba @ e27ac1268a3957332d22ca1b670184d64000e42a

mGBA Game Boy Advance Emulator

mVL: Endianness fixes
Vicki Pfau vi@endrift.com
Fri, 14 Aug 2020 21:00:33 -0700
commit

e27ac1268a3957332d22ca1b670184d64000e42a

parent

026d71a1f53db910f3fb2c7998407acf5344f082

1 files changed, 6 insertions(+), 1 deletions(-)

jump to
M src/feature/video-logger.csrc/feature/video-logger.c

@@ -296,11 +296,16 @@ if (channel && channel->injectionPoint == LOGGER_INJECTION_IMMEDIATE && !channel->injecting) {

mVideoLoggerRendererRunInjected(logger); ignorePackets = channel->ignorePackets; } + struct mVideoLoggerDirtyInfo buffer = {0}; struct mVideoLoggerDirtyInfo item = {0}; - while (logger->readData(logger, &item, sizeof(item), block)) { + while (logger->readData(logger, &buffer, sizeof(buffer), block)) { + LOAD_32LE(item.type, 0, &buffer.type); if (ignorePackets & (1 << item.type)) { continue; } + LOAD_32LE(item.address, 0, &buffer.address); + LOAD_32LE(item.value, 0, &buffer.value); + LOAD_32LE(item.value2, 0, &buffer.value2); switch (item.type) { case DIRTY_SCANLINE: if (channel && channel->injectionPoint == LOGGER_INJECTION_FIRST_SCANLINE && !channel->injecting && item.address == 0) {