aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2010-07-30 16:53:39 -0700
committerDavid 'Digit' Turner <digit@android.com>2010-07-30 16:54:39 -0700
commit3cf34f28ff198c69a02ed74a8e851b53cf3ff00c (patch)
treefc8abc91899b5dc6c6d5d8162c31182e4c31db3f /android
parent9b98dbde344781e93e2bdcfa599428cda2fda41d (diff)
downloadexternal_qemu-3cf34f28ff198c69a02ed74a8e851b53cf3ff00c.zip
external_qemu-3cf34f28ff198c69a02ed74a8e851b53cf3ff00c.tar.gz
external_qemu-3cf34f28ff198c69a02ed74a8e851b53cf3ff00c.tar.bz2
Fix window title to display the correct port number for the emulator.
Change-Id: I289451995683d5d4de2afe2e87481418a393c82f
Diffstat (limited to 'android')
-rw-r--r--android/core-ui-protocol.c14
-rw-r--r--android/core-ui-protocol.h3
-rw-r--r--android/qemu-setup.c3
-rw-r--r--android/qemulator.c7
4 files changed, 26 insertions, 1 deletions
diff --git a/android/core-ui-protocol.c b/android/core-ui-protocol.c
index a10812d..58517d4 100644
--- a/android/core-ui-protocol.c
+++ b/android/core-ui-protocol.c
@@ -18,9 +18,14 @@
*/
#include "android/globals.h"
+#include "android/android.h"
#include "android/core-ui-protocol.h"
+#if !defined(CONFIG_STANDALONE_CORE)
+/* in android/qemulator.c */
extern void android_emulator_set_window_scale( double, int );
+extern void android_emulator_set_base_port(int port);
+#endif
void
android_ui_set_window_scale(double scale, int is_dpi)
@@ -29,3 +34,12 @@ android_ui_set_window_scale(double scale, int is_dpi)
android_emulator_set_window_scale(scale, is_dpi);
#endif
}
+
+void
+android_ui_set_base_port(int port)
+{
+#if !defined(CONFIG_STANDALONE_CORE)
+ android_emulator_set_base_port(port);
+#endif
+}
+
diff --git a/android/core-ui-protocol.h b/android/core-ui-protocol.h
index 5fc2372..5ffe3d5 100644
--- a/android/core-ui-protocol.h
+++ b/android/core-ui-protocol.h
@@ -24,4 +24,7 @@
/* Changes the scale of the emulator window at runtime. */
void android_ui_set_window_scale(double scale, int is_dpi);
+/* Change the console port in the UI window */
+void android_ui_set_base_port(int port);
+
#endif // QEMU_ANDROID_CORE_UI_PROTOCOL_H
diff --git a/android/qemu-setup.c b/android/qemu-setup.c
index 9a41c4d..a790c37 100644
--- a/android/qemu-setup.c
+++ b/android/qemu-setup.c
@@ -330,7 +330,8 @@ void android_emulation_setup( void )
android_modem_init( base_port );
- android_base_port = base_port;
+ android_ui_set_base_port(base_port);
+
/* send a simple message to the ADB host server to tell it we just started.
* it should be listening on port 5037. if we can't reach it, don't bother
*/
diff --git a/android/qemulator.c b/android/qemulator.c
index f6dc550..4d6c771 100644
--- a/android/qemulator.c
+++ b/android/qemulator.c
@@ -593,3 +593,10 @@ android_emulator_set_window_scale( double scale, int is_dpi )
skin_window_set_scale( emulator->window, scale );
}
+
+void
+android_emulator_set_base_port( int port )
+{
+ android_base_port = port;
+ qemulator_set_title(qemulator);
+}