Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RGB565 and RGB888 color support to Quantum Painter #19382

Merged
merged 6 commits into from
Jan 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
another lint error fix
  • Loading branch information
infinityis committed Dec 20, 2022
commit 61181c7467e41d89dcf11c10ebf53d0269bb7bd4
6 changes: 3 additions & 3 deletions quantum/painter/qp_draw_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ static const qp_pixel_t qp_pixel_black = {.hsv888 = {.h = 0, .s = 0, .v = 0}};

bool qp_internal_bpp_capable(uint8_t bits_per_pixel) {
#if !(QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS)
#if !(QUANTUM_PAINTER_SUPPORTS_256_PALETTE)
# if !(QUANTUM_PAINTER_SUPPORTS_256_PALETTE)
if (bits_per_pixel > 4) {
qp_dprintf("qp_internal_decode_palette: image bpp greater than 4\n");
return false;
}
#endif
# endif

if (bits_per_pixel > 8) {
qp_dprintf("qp_internal_decode_palette: image bpp greater than 8\n");
Expand Down Expand Up @@ -154,7 +154,7 @@ bool qp_internal_byte_appender(uint8_t byteval, void* cb_arg) {

// If we've hit the transmit limit, send out the entire buffer and reset the write position
if (state->byte_write_pos == state->max_bytes) {
struct painter_driver_t *driver = (struct painter_driver_t*)state->device;
struct painter_driver_t* driver = (struct painter_driver_t*)state->device;
if (!driver->driver_vtable->pixdata(state->device, qp_internal_global_pixdata_buffer, state->byte_write_pos * 8 / driver->native_bits_per_pixel)) {
return false;
}
Expand Down