aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/curses.c10
-rw-r--r--ui/spice-display.c14
2 files changed, 12 insertions, 12 deletions
diff --git a/ui/curses.c b/ui/curses.c
index a39aee8..161f78c 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -265,7 +265,8 @@ static int curses2foo(const int _curses2foo[], const int _curseskey2foo[],
static void curses_refresh(DisplayChangeListener *dcl)
{
- int chr, keysym, keycode, keycode_alt;
+ wint_t chr = 0;
+ int keysym, keycode, keycode_alt;
enum maybe_keycode maybe_keycode = CURSES_KEYCODE;
curses_winch_check();
@@ -284,8 +285,9 @@ static void curses_refresh(DisplayChangeListener *dcl)
/* while there are any pending key strokes to process */
chr = console_getch(&maybe_keycode);
- if (chr == -1)
+ if (chr == WEOF) {
break;
+ }
#ifdef KEY_RESIZE
/* this shouldn't occur when we use a custom SIGWINCH handler */
@@ -304,9 +306,9 @@ static void curses_refresh(DisplayChangeListener *dcl)
/* alt or esc key */
if (keycode == 1) {
enum maybe_keycode next_maybe_keycode = CURSES_KEYCODE;
- int nextchr = console_getch(&next_maybe_keycode);
+ wint_t nextchr = console_getch(&next_maybe_keycode);
- if (nextchr != -1) {
+ if (nextchr != WEOF) {
chr = nextchr;
maybe_keycode = next_maybe_keycode;
keycode_alt = ALT;
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 9ce622c..669832c 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -1183,20 +1183,20 @@ static void qemu_spice_gl_release_dmabuf(DisplayChangeListener *dcl,
egl_dmabuf_release_texture(dmabuf);
}
-static bool spice_gl_blit_scanout_texture(SimpleSpiceDisplay *ssd,
- egl_fb *scanout_tex_fb)
+static bool spice_gl_blit_scanout_texture(SimpleSpiceDisplay *ssd)
{
uint32_t offsets[DMABUF_MAX_PLANES], strides[DMABUF_MAX_PLANES];
int fds[DMABUF_MAX_PLANES], num_planes, fourcc;
+ egl_fb scanout_tex_fb = {};
uint64_t modifier;
bool ret;
- egl_fb_destroy(scanout_tex_fb);
- egl_fb_setup_for_tex(scanout_tex_fb,
+ egl_fb_setup_for_tex(&scanout_tex_fb,
surface_width(ssd->ds), surface_height(ssd->ds),
ssd->ds->texture, false);
- egl_fb_blit(scanout_tex_fb, &ssd->guest_fb, false);
+ egl_fb_blit(&scanout_tex_fb, &ssd->guest_fb, false);
glFlush();
+ egl_fb_destroy(&scanout_tex_fb);
if (!ssd->new_scanout_texture) {
return true;
@@ -1330,9 +1330,7 @@ static void qemu_spice_gl_update(DisplayChangeListener *dcl,
}
if (spice_remote_client && ssd->blit_scanout_texture) {
- egl_fb scanout_tex_fb;
-
- ret = spice_gl_blit_scanout_texture(ssd, &scanout_tex_fb);
+ ret = spice_gl_blit_scanout_texture(ssd);
if (!ret) {
return;
}