Skip to content

Commit

Permalink
pico: always set cur_surf_info.bounds/format
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Aug 12, 2024
1 parent 8ad28e2 commit 85ac8af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 32blit-pico/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SurfaceInfo &set_screen_mode(ScreenMode mode) {
// may fail for hires/palette
if(set_screen_mode_format(mode, temp)) {
cur_surf_info.data = temp.data;
cur_surf_info.bounds = temp.bounds;
cur_surf_info.format = temp.format;
cur_surf_info.palette = temp.palette;
}

Expand Down Expand Up @@ -84,6 +82,9 @@ bool set_screen_mode_format(ScreenMode new_mode, SurfaceTemplate &new_surf_templ
if(!fb_double_buffer)
screen.data = new_surf_template.data;

cur_surf_info.bounds = new_surf_template.bounds;
cur_surf_info.format = new_surf_template.format;

display_mode_changed(new_mode, new_surf_template);

cur_screen_mode = new_mode;
Expand Down

0 comments on commit 85ac8af

Please sign in to comment.