diff options
author | Inès Varhol <ines.varhol@telecom-paris.fr> | 2024-09-15 14:57:00 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2024-09-20 08:06:57 +0300 |
commit | d524be28c5933a9d7605955a2368212a31c72d16 (patch) | |
tree | 8e247fa1e1dff20cb6e21942e350e258cacda23e | |
parent | 26111a30adac00c814af6672b8d99716949613e8 (diff) | |
download | qemu-d524be28c5933a9d7605955a2368212a31c72d16.zip qemu-d524be28c5933a9d7605955a2368212a31c72d16.tar.gz qemu-d524be28c5933a9d7605955a2368212a31c72d16.tar.bz2 |
hw/display: Fix mirrored output in dm163
DM163 is an emulated 8x8 LED matrix. This commit flips the image
horizontally so it's rendered the same way as on the hardware.
Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | hw/display/dm163.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/dm163.c b/hw/display/dm163.c index f92aee3..75a91f6 100644 --- a/hw/display/dm163.c +++ b/hw/display/dm163.c @@ -271,7 +271,7 @@ static uint32_t *update_display_of_row(DM163State *s, uint32_t *dest, unsigned row) { for (unsigned _ = 0; _ < LED_SQUARE_SIZE; _++) { - for (int x = 0; x < RGB_MATRIX_NUM_COLS * LED_SQUARE_SIZE; x++) { + for (int x = RGB_MATRIX_NUM_COLS * LED_SQUARE_SIZE - 1; x >= 0; x--) { /* UI layer guarantees that there's 32 bits per pixel (Mar 2024) */ *dest++ = s->buffer[s->buffer_idx_of_row[row]][x / LED_SQUARE_SIZE]; } |