Skip to content

Commit

Permalink
pico: stop pretending PicoVision is RGB565
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Jul 26, 2023
1 parent 5e7f28c commit 5411fdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions 32blit-pico/board/pimoroni_picovision/config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#define DEFAULT_SCREEN_FORMAT PixelFormat::BGR555

// native
#define SD_CLK 10
#define SD_CMD 11
Expand Down
4 changes: 2 additions & 2 deletions 32blit-pico/display_picovision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static void blit_rgba_rgb555_picovision(const blit::Surface* src, uint32_t soff,

flush_batch();

if(src->format == blit::PixelFormat::RGB565) // still a lie
if(src->format == blit::PixelFormat::BGR555)
return blit_rgb555<h_repeat>((uint16_t *)s, dest, doff, cnt, src_step);

do {
Expand Down Expand Up @@ -422,7 +422,7 @@ bool display_render_needed() {
}

bool display_mode_supported(blit::ScreenMode new_mode, const blit::SurfaceTemplate &new_surf_template) {
if(new_surf_template.format != blit::PixelFormat::RGB565) // this is a lie
if(new_surf_template.format != blit::PixelFormat::BGR555)
return false;

if(find_resolution(new_surf_template.bounds) != -1)
Expand Down

0 comments on commit 5411fdb

Please sign in to comment.