all repos — mgba @ 1cf587c6c326bca26fc15f038719448995c76b76

mGBA Game Boy Advance Emulator

DS GX: Implement VIEWPORT command
Vicki Pfau vi@endrift.com
Tue, 28 Feb 2017 13:09:03 -0800
commit

1cf587c6c326bca26fc15f038719448995c76b76

parent

9ad56b1b798d1df66eaab8b7099aac4f07d11ac0

1 files changed, 8 insertions(+), 0 deletions(-)

jump to
M src/ds/gx.csrc/ds/gx.c

@@ -614,6 +614,14 @@ break;

case DS_GX_CMD_SWAP_BUFFERS: gx->swapBuffers = true; break; + case DS_GX_CMD_VIEWPORT: + gx->viewportX1 = (uint8_t) entry.params[0]; + gx->viewportY1 = (uint8_t) entry.params[1]; + gx->viewportX2 = (uint8_t) entry.params[2]; + gx->viewportY2 = (uint8_t) entry.params[3]; + gx->viewportWidth = gx->viewportX2 - gx->viewportX1; + gx->viewportHeight = gx->viewportY2 - gx->viewportY1; + break; default: mLOG(DS_GX, STUB, "Unimplemented GX command %02X:%02X %02X %02X %02X", entry.command, entry.params[0], entry.params[1], entry.params[2], entry.params[3]); break;