aboutsummaryrefslogtreecommitdiffstats
path: root/android/multitouch-screen.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-05-15 07:59:51 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-05-15 07:59:51 -0700
commit6df71197252e119baccbe4dd060935222af4f8ba (patch)
tree7ea2d2aca6744b1b96f57905316dd2a8ee782ec5 /android/multitouch-screen.c
parent86daf2d663697d86d4c20cf571c3c4b66c67d1a5 (diff)
downloadexternal_qemu-6df71197252e119baccbe4dd060935222af4f8ba.zip
external_qemu-6df71197252e119baccbe4dd060935222af4f8ba.tar.gz
external_qemu-6df71197252e119baccbe4dd060935222af4f8ba.tar.bz2
Refresh stale SdkController screen.
When MT handler gets deactivated, and then activated again, it shows a stale emulator display, since it didn't have a chance to catch up with emulator display updates. This CL ensures that entire emulator display is pushed to the device when MT handler gets activated. Change-Id: I58c1680f50e2af3e6afa0518f6bcaa3ed087638d
Diffstat (limited to 'android/multitouch-screen.c')
-rw-r--r--android/multitouch-screen.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/android/multitouch-screen.c b/android/multitouch-screen.c
index 59d4d75..155218a 100644
--- a/android/multitouch-screen.c
+++ b/android/multitouch-screen.c
@@ -87,7 +87,7 @@ typedef struct MTSState {
} MTSState;
/* Default multi-touch screen descriptor */
-static MTSState _MTSState;
+static MTSState _MTSState = { 0 };
/* Pushes event to the event device. */
static void
@@ -376,6 +376,22 @@ multitouch_opengles_fb_update(void* context,
_mt_fb_common_update(mts_state, 0, 0, w, h);
}
+void multitouch_refresh_screen(void)
+{
+ MTSState* const mts_state = &_MTSState;
+
+ /* Make sure MT port is initialized. */
+ if (!_is_mt_initialized) {
+ return;
+ }
+
+ /* Lets see if any updates have been received so far. */
+ if (NULL != mts_state->current_fb) {
+ _mt_fb_common_update(mts_state, 0, 0, mts_state->fb_header.disp_width,
+ mts_state->fb_header.disp_height);
+ }
+}
+
void
multitouch_init(AndroidMTSPort* mtsp)
{