summaryrefslogtreecommitdiff
path: root/tizen/src/emul_state.c
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2015-08-09 15:58:58 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2015-08-10 16:45:06 +0900
commit26788e22290a81efe6a4fcfb6beffc4b95427c76 (patch)
tree2c42c91c1c94375c3d39dbca6fd44dedc2bb1819 /tizen/src/emul_state.c
parenta1adc7b2693aad6e4935f9b13a82f7a918fba9a2 (diff)
downloadqemu-26788e22290a81efe6a4fcfb6beffc4b95427c76.tar.gz
qemu-26788e22290a81efe6a4fcfb6beffc4b95427c76.tar.bz2
qemu-26788e22290a81efe6a4fcfb6beffc4b95427c76.zip
qt5: respect QemuConsole and DisplaySurface
Change-Id: I5ae832a2ab72ab3f49aa791ba557430d2a2ab7c6 Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Diffstat (limited to 'tizen/src/emul_state.c')
-rw-r--r--tizen/src/emul_state.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c
index a31de28b48..c064186692 100644
--- a/tizen/src/emul_state.c
+++ b/tizen/src/emul_state.c
@@ -652,8 +652,8 @@ const char *get_vm_data_path(void)
}
// display resolution
-static int initial_resolution_width = -1;
-static int initial_resolution_height = -1;
+int initial_resolution_width = -1;
+int initial_resolution_height = -1;
#ifdef CONFIG_JAVA_UI
static void set_resolution_legacy(void)
@@ -685,22 +685,36 @@ void set_initial_display_resolution(int width, int height)
int get_display_resolution_width(void)
{
-#ifdef CONFIG_JAVA_UI
+#ifndef CONFIG_JAVA_UI
+ return qemu_console_get_width(NULL, -1);
+#else
+ if (display_type == DT_MARU_QT_ONSCREEN ||
+ display_type == DT_MARU_QT_OFFSCREEN) {
+ return qemu_console_get_width(NULL, -1);
+ }
if (initial_resolution_width == -1) {
set_resolution_legacy();
}
-#endif
+ // for JAVA_UI
return initial_resolution_width;
+#endif
}
int get_display_resolution_height(void)
{
-#ifdef CONFIG_JAVA_UI
- if (initial_resolution_width == -1) {
+#ifndef CONFIG_JAVA_UI
+ return qemu_console_get_height(NULL, -1);
+#else
+ if (display_type == DT_MARU_QT_ONSCREEN ||
+ display_type == DT_MARU_QT_OFFSCREEN) {
+ return qemu_console_get_height(NULL, -1);
+ }
+ if (initial_resolution_height == -1) {
set_resolution_legacy();
}
-#endif
+ // for JAVA_UI
return initial_resolution_height;
+#endif
}
#ifdef CONFIG_JAVA_UI