GBA Video: Null renderer should return proper register values

This commit is contained in:
Jeffrey Pfau 2016-04-29 00:32:12 -07:00
parent a6e3c07b0f
commit 3c45983d10
1 changed files with 32 additions and 1 deletions

View File

@ -224,7 +224,38 @@ static void GBAVideoDummyRendererDeinit(struct GBAVideoRenderer* renderer) {
static uint16_t GBAVideoDummyRendererWriteVideoRegister(struct GBAVideoRenderer* renderer, uint32_t address, uint16_t value) {
UNUSED(renderer);
UNUSED(address);
switch (address) {
case REG_BG0CNT:
case REG_BG1CNT:
value &= 0xDFFF;
break;
case REG_BG2CNT:
case REG_BG3CNT:
value &= 0xFFFF;
break;
case REG_BG0HOFS:
case REG_BG0VOFS:
case REG_BG1HOFS:
case REG_BG1VOFS:
case REG_BG2HOFS:
case REG_BG2VOFS:
case REG_BG3HOFS:
case REG_BG3VOFS:
value &= 0x01FF;
break;
case REG_BLDCNT:
value &= 0x3FFF;
break;
case REG_BLDALPHA:
value &= 0x1F1F;
break;
case REG_WININ:
case REG_WINOUT:
value &= 0x3F3F;
break;
default:
break;
}
return value;
}