diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-30 11:39:06 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-05 10:57:34 -0500 |
commit | 97ad1c260cb76f834aa90dc6350fe405172b2cc3 (patch) | |
tree | 1df60f307b03e994e29b944aa8f51b3d3aa83a41 /ui | |
parent | 91ada9808408fcad818ced7309f47c5fb91c6075 (diff) |
sdl: Avoid redundant scaling deactivation
Prevents screen flickering.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sdl.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -583,10 +583,12 @@ static void sdl_refresh(DisplayState *ds) gui_keysym = 1; break; case 0x16: /* 'u' key on US keyboard */ - scaling_active = 0; - sdl_resize(ds); - vga_hw_invalidate(); - vga_hw_update(); + if (scaling_active) { + scaling_active = 0; + sdl_resize(ds); + vga_hw_invalidate(); + vga_hw_update(); + } break; case 0x02 ... 0x0a: /* '1' to '9' keys */ /* Reset the modifiers sent to the current console */ |