mirror of https://github.com/mgba-emu/mgba.git
Pass off video registers to renderer
This commit is contained in:
parent
573fcead5d
commit
cdddcbf7aa
|
@ -7,6 +7,9 @@ void GBAIOInit(struct GBA* gba) {
|
|||
}
|
||||
|
||||
void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
||||
if (address < REG_SOUND1CNT_LO && address != REG_DISPSTAT) {
|
||||
gba->video.renderer->writeVideoRegister(gba->video.renderer, address, value);
|
||||
} else {
|
||||
switch (address) {
|
||||
// Video
|
||||
case REG_DISPSTAT:
|
||||
|
@ -95,6 +98,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
|||
GBALog(GBA_LOG_STUB, "Stub I/O register write: %03x", address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
gba->memory.io[address >> 1] = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,10 @@ static void GBAVideoSoftwareRendererDeinit(struct GBAVideoRenderer* renderer) {
|
|||
|
||||
static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRenderer* renderer, uint32_t address, uint16_t value) {
|
||||
struct GBAVideoSoftwareRenderer* softwareRenderer = (struct GBAVideoSoftwareRenderer*) renderer;
|
||||
switch (address) {
|
||||
default:
|
||||
GBALog(GBA_LOG_STUB, "Stub video register write: %03x", address);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue