summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2015-08-11 16:30:22 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2015-08-11 16:31:13 +0900
commite4ad1ff20d33d8d1fed8393873e6e7e11ba059bb (patch)
tree023232eb5f4349019c700e4ab3880f8f0eeb2437 /vl.c
parent7e8d41619b251177196f62a6c44ecdce047aaadc (diff)
parent933aac74b478bd50b5516c2f018669fb72c0f675 (diff)
downloadqemu-e4ad1ff20d33d8d1fed8393873e6e7e11ba059bb.tar.gz
qemu-e4ad1ff20d33d8d1fed8393873e6e7e11ba059bb.tar.bz2
qemu-e4ad1ff20d33d8d1fed8393873e6e7e11ba059bb.zip
Merge branch 'tizen_2.4_develop' into tizen_3.0_develop
Change-Id: Ibe175099ae8f1db0d5b48bb61e13efc72340282a Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c50
1 files changed, 38 insertions, 12 deletions
diff --git a/vl.c b/vl.c
index 6e92b5a0dc..a1d9dcdf17 100644
--- a/vl.c
+++ b/vl.c
@@ -133,9 +133,12 @@ int qemu_main(int argc, char **argv, char **envp);
#ifdef CONFIG_MARU
#include "tizen/src/emulator.h"
#include "tizen/src/emul_state.h"
-#include "tizen/src/display/maru_display.h"
-#include "tizen/src/skin/maruskin_operation.h"
+#include "tizen/src/ui/qt5.h"
+#include "tizen/src/util/ui_operations.h"
#include "tizen/src/ecs/ecs.h"
+# ifdef CONFIG_JAVA_UI
+#include "tizen/src/display/maru_display.h"
+# endif
#endif
#define DEFAULT_RAM_SIZE 128
@@ -1809,7 +1812,7 @@ void qemu_system_killed(int signal, pid_t pid)
no_shutdown = 0;
#ifdef CONFIG_MARU
- shutdown_qemu_gracefully(TIMEOUT_FOR_SHUTDOWN);
+ qemu_system_graceful_shutdown_request(TIMEOUT_FOR_SHUTDOWN);
#else
qemu_system_shutdown_request();
#endif
@@ -2166,14 +2169,14 @@ static DisplayType select_display(const char *p)
#endif
#ifdef CONFIG_MARU
} else if (strstart(p, "maru_sdl", &opts)) {
-# ifdef CONFIG_SDL
+# if defined(CONFIG_SDL) && defined(CONFIG_JAVA_UI)
display = DT_MARU_SDL;
# else
fprintf(stderr, "maru_sdl support is disabled\n");
exit(1);
# endif
} else if (strstart(p, "maru_shm", &opts)) {
-# ifdef CONFIG_USE_SHM
+# if defined(CONFIG_USE_SHM) && defined(CONFIG_JAVA_UI)
display = DT_MARU_SHM;
# else
fprintf(stderr, "maru_shm is disabled\n");
@@ -2181,7 +2184,8 @@ static DisplayType select_display(const char *p)
# endif
} else if (strstart(p, "maru_qt", &opts)) {
# ifdef CONFIG_QT
- if (*opts) {
+ display = DT_MARU_QT_ONSCREEN;
+ while (*opts) {
const char *nextopt;
if (strstart(opts, ",rendering=", &nextopt)) {
opts = nextopt;
@@ -2192,13 +2196,32 @@ static DisplayType select_display(const char *p)
} else {
goto invalid_maru_qt_args;
}
+ } else if (strstart(opts, ",resolution=", &nextopt)) {
+ opts = nextopt;
+ char *endptr = NULL;
+ // Resolution should be formed "640x480" or "640*480".
+ int width = (int)g_ascii_strtoll(opts, &endptr, 10);
+ int height = (int)g_ascii_strtoll(++endptr, &endptr, 10);
+ if (width == 0 || height == 0) {
+ goto invalid_maru_qt_args;
+ }
+ set_initial_display_resolution(width, height);
+ nextopt = endptr;
+ } else if (strstart(opts, ",dpi=", &nextopt)) {
+ opts = nextopt;
+ char *endptr = NULL;
+ int dpi = (int)g_ascii_strtoll(opts, &endptr, 10);
+ if (dpi == 0) {
+ goto invalid_maru_qt_args;
+ }
+ set_display_pixel_density(dpi);
+ nextopt = endptr;
} else {
invalid_maru_qt_args:
fprintf(stderr, "Invalid maru_qt option string: %s\n", p);
exit(1);
}
- } else {
- display = DT_MARU_QT_ONSCREEN;
+ opts = nextopt;
}
# else
error_report("maru_qt is disabled.\n");
@@ -4195,10 +4218,13 @@ int main(int argc, char **argv, char **envp)
#endif
#ifdef CONFIG_MARU
- if (display_type == DT_MARU_QT_ONSCREEN ||
- display_type == DT_MARU_QT_OFFSCREEN) {
- maru_display_early_init(display_type);
+# if defined(CONFIG_QT)
+ if (display_type == DT_MARU_QT_ONSCREEN) {
+ maru_early_qt5_display_init(true);
+ } else if (display_type == DT_MARU_QT_OFFSCREEN) {
+ maru_early_qt5_display_init(false);
}
+# endif
#endif
socket_init();
@@ -4521,7 +4547,7 @@ int main(int argc, char **argv, char **envp)
#if defined(CONFIG_QT)
case DT_MARU_QT_ONSCREEN:
case DT_MARU_QT_OFFSCREEN:
- maru_display_init(ds, display_type, full_screen);
+ maru_qt5_display_init(ds, full_screen);
break;
#endif
#endif