qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 408373: ui/curses: Fix color attribute of mon


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 408373: ui/curses: Fix color attribute of monitor for curs...
Date: Fri, 08 Jan 2016 05:30:04 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4083733db5e4120939acee57019ff52db1f45b9d
      
https://github.com/qemu/qemu/commit/4083733db5e4120939acee57019ff52db1f45b9d
  Author: OGAWA Hirofumi <address@hidden>
  Date:   2016-01-08 (Fri, 08 Jan 2016)

  Changed paths:
    M hw/display/jazz_led.c
    M hw/display/vga.c
    M include/ui/console.h
    M ui/console.c
    M ui/curses.c

  Log Message:
  -----------
  ui/curses: Fix color attribute of monitor for curses

Current text_console_update() writes totally broken color attributes
to console_write_ch(). The format now is writing,

[WRONG]
        bold << 21 | fg << 12 | bg << 8 | char
        fg == 3bits curses color number
        bg == 3bits curses color number

I can't see this format is where come from. Anyway, this doesn't work
at all.

What curses expects is actually (and vga.c is using),

[RIGHT]
        bold << 21 | bg << 11 | fg << 8 | char
        fg == 3bits vga color number
        bg == 3bits vga color number

And curses set COLOR_PAIR() up to match this format, and curses's
chtype. I.e,

        bold | color_pair | char
        color_pair == (bg << 3 | fg)

To fix, this simply uses VGA color number everywhere except curses.c
internal. Then, convert it to above [RIGHT] format to write by
console_write_ch(). And as bonus, this reduces to expose curses define
to other parts (removes COLOR_* from console.c).

[Tested the first line is displayed as white on blue back for monitor
in curses console]

Signed-off-by: OGAWA Hirofumi <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: cb47dc9ab9f55083017291b2b8fbae639c576ec2
      
https://github.com/qemu/qemu/commit/cb47dc9ab9f55083017291b2b8fbae639c576ec2
  Author: Gerd Hoffmann <address@hidden>
  Date:   2016-01-08 (Fri, 08 Jan 2016)

  Changed paths:
    M include/ui/sdl2.h
    M ui/sdl2-gl.c
    M ui/sdl2.c

  Log Message:
  -----------
  sdl2/opengl: add opengl context and scanout support

This allows virtio-gpu to render in 3d mode.

Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 6bb9ead762bf749af11ea225fc2a74db1b93c105
      
https://github.com/qemu/qemu/commit/6bb9ead762bf749af11ea225fc2a74db1b93c105
  Author: Peter Maydell <address@hidden>
  Date:   2016-01-08 (Fri, 08 Jan 2016)

  Changed paths:
    M hw/display/jazz_led.c
    M hw/display/vga.c
    M include/ui/console.h
    M include/ui/sdl2.h
    M ui/console.c
    M ui/curses.c
    M ui/sdl2-gl.c
    M ui/sdl2.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into 
staging

sdl2/opengl: add opengl context and scanout support
ui/curses: Fix color attribute of monitor for curses

# gpg: Signature made Fri 08 Jan 2016 12:42:02 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>"
# gpg:                 aka "Gerd Hoffmann <address@hidden>"
# gpg:                 aka "Gerd Hoffmann (private) <address@hidden>"

* remotes/kraxel/tags/pull-ui-20160108-1:
  sdl2/opengl: add opengl context and scanout support
  ui/curses: Fix color attribute of monitor for curses

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/9df2513730c5...6bb9ead762bf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]