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) {
|
if (frames >= test_length && !gb->disable_rendering) {
|
||||||
bool is_screen_blank = true;
|
bool is_screen_blank = true;
|
||||||
for (unsigned i = GB_get_screen_width(gb) * GB_get_screen_height(gb); i--;) {
|
if (!gb->sgb) {
|
||||||
if (bitmap[i] != bitmap[0]) {
|
for (unsigned i = 160 * 144; i--;) {
|
||||||
is_screen_blank = false;
|
if (bitmap[i] != bitmap[0]) {
|
||||||
break;
|
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