Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 1eeaa53

Browse files
committed
Fix background bitmap buffer index (for Anniversary editions)
1 parent bdee96f commit 1eeaa53

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

graphics_gl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ void GraphicsGL::drawSprite(int listNum, int num, const Point *pt, uint8_t color
504504
}
505505

506506
void GraphicsGL::drawBitmap(int listNum, const uint8_t *data, int w, int h, int fmt) {
507-
assert(listNum == 0);
508507
_backgroundTex._fmt = fmt;
509508
switch (fmt) {
510509
case FMT_CLUT:

video.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,9 @@ void Video::scaleBitmap(const uint8_t *src, int fmt) {
463463
const int h = BITMAP_H * _scalerFactor;
464464
const int depth = (fmt == FMT_CLUT) ? 1 : 2;
465465
_scaler->scale(_scalerFactor, depth, _scalerBuffer, w * depth, src, BITMAP_W * depth, BITMAP_W, BITMAP_H);
466-
_graphics->drawBitmap(0, _scalerBuffer, w, h, fmt);
466+
_graphics->drawBitmap(_buffers[0], _scalerBuffer, w, h, fmt);
467467
} else {
468-
_graphics->drawBitmap(0, src, BITMAP_W, BITMAP_H, fmt);
468+
_graphics->drawBitmap(_buffers[0], src, BITMAP_W, BITMAP_H, fmt);
469469
}
470470
}
471471

@@ -495,7 +495,7 @@ void Video::copyBitmapPtr(const uint8_t *src, uint32_t size) {
495495
int w, h;
496496
uint8_t *buf = decode_bitmap(src, false, -1, &w, &h);
497497
if (buf) {
498-
_graphics->drawBitmap(0, buf, w, h, FMT_RGB);
498+
_graphics->drawBitmap(_buffers[0], buf, w, h, FMT_RGB);
499499
free(buf);
500500
}
501501
}

0 commit comments

Comments
 (0)