GBA Video: Initialize offset values

This commit is contained in:
Vicki Pfau 2022-03-10 23:52:18 -08:00
parent 54bccfd2cd
commit 095481ae2e
1 changed files with 5 additions and 0 deletions

View File

@ -808,6 +808,8 @@ void GBAVideoGLRendererInit(struct GBAVideoRenderer* renderer) {
bg->affine.dmy = 256;
bg->affine.sx = 0;
bg->affine.sy = 0;
bg->offsetX = 0;
bg->offsetY = 0;
glGenFramebuffers(1, &bg->fbo);
glGenTextures(1, &bg->tex);
}
@ -923,6 +925,9 @@ void GBAVideoGLRendererReset(struct GBAVideoRenderer* renderer) {
glRenderer->shadowRegs[REG_DISPCNT >> 1] = glRenderer->dispcnt;
glRenderer->regsDirty = 0xFFFFFFFFFFFEULL;
glRenderer->objOffsetX = 0;
glRenderer->objOffsetY = 0;
int i;
for (i = 0; i < 512; ++i) {
int r = M_R5(glRenderer->d.palette[i]);