mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-27 11:00:47 +00:00
Correct blank image detection on SGB
This commit is contained in:
parent
893d7d162a
commit
6b947c46bc
@ -140,10 +140,22 @@ static void vblank(GB_gameboy_t *gb)
|
||||
|
||||
if (frames >= test_length && !gb->disable_rendering) {
|
||||
bool is_screen_blank = true;
|
||||
for (unsigned i = GB_get_screen_width(gb) * GB_get_screen_height(gb); i--;) {
|
||||
if (bitmap[i] != bitmap[0]) {
|
||||
is_screen_blank = false;
|
||||
break;
|
||||
if (!gb->sgb) {
|
||||
for (unsigned i = 160 * 144; i--;) {
|
||||
if (bitmap[i] != bitmap[0]) {
|
||||
is_screen_blank = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (gb->sgb->mask_mode == 0) {
|
||||
for (unsigned i = 160 * 144; i--;) {
|
||||
if (gb->sgb->screen_buffer[i] != gb->sgb->screen_buffer[0]) {
|
||||
is_screen_blank = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user