diff --git a/32blit-pico/display.cpp b/32blit-pico/display.cpp index 819b3307f..8f72ac20b 100644 --- a/32blit-pico/display.cpp +++ b/32blit-pico/display.cpp @@ -26,10 +26,7 @@ static const Size hires_screen_size(DISPLAY_WIDTH, DISPLAY_HEIGHT); ScreenMode cur_screen_mode = ScreenMode::lores; int get_display_page_size() { - if(cur_screen_mode == blit::ScreenMode::lores) // paletted is half the size - return blit::screen.format == blit::PixelFormat::P ? lores_page_size / 2 : lores_page_size; - else // paletted hires - return DISPLAY_WIDTH * DISPLAY_HEIGHT; + return cur_surf_info.bounds.area() * pixel_format_stride[int(cur_surf_info.format)]; } // blit api