Skip to content

Commit

Permalink
pico: fix scanvideo double-buffer init
Browse files Browse the repository at this point in the history
Probably worked on the loader branch, but not here
  • Loading branch information
Daft-Freak committed Aug 12, 2024
1 parent eb20ed4 commit b8129f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 32blit-pico/display/scanvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ bool display_mode_supported(blit::ScreenMode new_mode, const blit::SurfaceTempla
void display_mode_changed(blit::ScreenMode new_mode, blit::SurfaceTemplate &new_surf_template) {
auto display_buf_base = (uint8_t *)screen_fb;

bool use_second_buf = fb_double_buffer && screen.data == display_buf_base;
bool use_second_buf = fb_double_buffer && (!screen.data || screen.data == display_buf_base);
cur_display_buffer = use_second_buf ? display_buf_base + get_display_page_size() : display_buf_base;
}

0 comments on commit b8129f9

Please sign in to comment.