mirror of
https://github.com/qemu/qemu.git
synced 2024-12-29 23:23:55 +08:00
ui: gtk fixes, support more formats in sdl2.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJbwJ/UAAoJEEy22O7T6HE4MKEP+wQQx5S9Bqp2T9m+I4r1nN8S YO2JaUd32eg9dl+cERZIJaDilB8nxpYan3ls943ews+I8cRUr7OMyK2Pie7UaVIA NDPguzzd1FTMdfElgzqgQD1v7xzoZvMkWZslnzRdS230Gj2fOqLKyX8no9gLWHgx 28h0CR9UQrr/r/YIPwl/ES3itNIcqiyoerZdq7a1S9QRFSMQUMuByzCoslUfhW1b u4slicN7+UevvClgh0MdPon9qjTBA7Qt2u4OLQpoY2o20i8X+YnCBUmP8baOLM/t sFoWKdsX6Lrcl0BPCE43NDVUSuQfY2MlUOtmmmheuRaxxB83Eh9PhCNwWvBEn03J YSdVhp1XsehXaIZSNMhFr+IB4pKh3nJyWBVHoLl0HF8GmolaylAc7PKF3jqf+xWP DHPbo5fo0WkCV5Wh79pBsSxWLdjUXyMin+9SYz4eCqwM1ikvnKlyaepyTE3YzFMX oiSqVA0lNXrES416i4aN+v3P7OJSp67hPJhIz7mj2zZZyF1JvkdpSFpeHqM84tS1 I19QXZjSFMSsMyMVv5Qo/meVZd/q4hGxEUZX+PLOr+RMiOqyGvzW6/o01oSNv41w Zb1ohUAxWvX9xXYItNzCPhHwqzTxCgOe+i6FWvZopSyjJtPyI6xfDLNRgUVf1l5C 2mU5f9ON30z7nueiQJuB =rekL -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/ui-20181012-pull-request' into staging ui: gtk fixes, support more formats in sdl2. # gpg: Signature made Fri 12 Oct 2018 14:21:24 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20181012-pull-request: gtk: fix uninitialized variable sdl2: Support all virtio-gpu formats gtk: Don't vte_terminal_set_encoding() on new VTE versions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
a73549f996
8
ui/gtk.c
8
ui/gtk.c
@ -1951,12 +1951,14 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
|
||||
g_signal_connect(vc->vte.terminal, "commit", G_CALLBACK(gd_vc_in), vc);
|
||||
|
||||
/* The documentation says that the default is UTF-8, but actually it is
|
||||
* 7-bit ASCII at least in VTE 0.38.
|
||||
*/
|
||||
* 7-bit ASCII at least in VTE 0.38. The function is deprecated since
|
||||
* VTE 0.54 (only UTF-8 is supported now). */
|
||||
#if !VTE_CHECK_VERSION(0, 54, 0)
|
||||
#if VTE_CHECK_VERSION(0, 38, 0)
|
||||
vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8", NULL);
|
||||
#else
|
||||
vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte.terminal), -1);
|
||||
@ -2136,7 +2138,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
|
||||
QemuConsole *con, int idx,
|
||||
GSList *group, GtkWidget *view_menu)
|
||||
{
|
||||
bool zoom_to_fit;
|
||||
bool zoom_to_fit = false;
|
||||
|
||||
vc->label = qemu_console_get_label(con);
|
||||
vc->s = s;
|
||||
|
15
ui/sdl2-2d.c
15
ui/sdl2-2d.c
@ -101,15 +101,24 @@ void sdl2_2d_switch(DisplayChangeListener *dcl,
|
||||
case PIXMAN_r5g6b5:
|
||||
format = SDL_PIXELFORMAT_RGB565;
|
||||
break;
|
||||
case PIXMAN_a8r8g8b8:
|
||||
case PIXMAN_x8r8g8b8:
|
||||
format = SDL_PIXELFORMAT_ARGB8888;
|
||||
break;
|
||||
case PIXMAN_a8b8g8r8:
|
||||
case PIXMAN_x8b8g8r8:
|
||||
format = SDL_PIXELFORMAT_ABGR8888;
|
||||
break;
|
||||
case PIXMAN_r8g8b8a8:
|
||||
case PIXMAN_r8g8b8x8:
|
||||
format = SDL_PIXELFORMAT_RGBA8888;
|
||||
break;
|
||||
case PIXMAN_b8g8r8x8:
|
||||
format = SDL_PIXELFORMAT_BGRX8888;
|
||||
break;
|
||||
case PIXMAN_b8g8r8a8:
|
||||
format = SDL_PIXELFORMAT_BGRA8888;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
@ -149,7 +158,13 @@ bool sdl2_2d_check_format(DisplayChangeListener *dcl,
|
||||
* the native ones. Thes are the ones I have tested.
|
||||
*/
|
||||
return (format == PIXMAN_x8r8g8b8 ||
|
||||
format == PIXMAN_a8r8g8b8 ||
|
||||
format == PIXMAN_a8b8g8r8 ||
|
||||
format == PIXMAN_x8b8g8r8 ||
|
||||
format == PIXMAN_b8g8r8x8 ||
|
||||
format == PIXMAN_b8g8r8a8 ||
|
||||
format == PIXMAN_r8g8b8x8 ||
|
||||
format == PIXMAN_r8g8b8a8 ||
|
||||
format == PIXMAN_x1r5g5b5 ||
|
||||
format == PIXMAN_r5g6b5);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user