Fix a silly bug

This commit is contained in:
Lior Halphon 2019-07-18 00:53:11 +03:00
parent 9ba6915c85
commit 772289c545

View File

@ -376,6 +376,8 @@ static void render_pixel_if_possible(GB_gameboy_t *gb)
}
}
uint8_t icd_pixel = 0;
{
uint8_t pixel = bg_enabled? fifo_item->pixel : 0;
if (pixel && bg_priority) {
@ -391,7 +393,8 @@ static void render_pixel_if_possible(GB_gameboy_t *gb)
}
else if (gb->model & GB_MODEL_NO_SFC_BIT) {
if (gb->icd_pixel_callback) {
gb->icd_pixel_callback(gb, pixel);
icd_pixel = pixel;
//gb->icd_pixel_callback(gb, pixel);
}
}
else {
@ -412,7 +415,8 @@ static void render_pixel_if_possible(GB_gameboy_t *gb)
}
else if (gb->model & GB_MODEL_NO_SFC_BIT) {
if (gb->icd_pixel_callback) {
gb->icd_pixel_callback(gb, pixel);
icd_pixel = pixel;
//gb->icd_pixel_callback(gb, pixel);
}
}
else {
@ -420,6 +424,12 @@ static void render_pixel_if_possible(GB_gameboy_t *gb)
}
}
if (gb->model & GB_MODEL_NO_SFC_BIT) {
if (gb->icd_pixel_callback) {
gb->icd_pixel_callback(gb, icd_pixel);
}
}
gb->position_in_line++;
}