# ifdef CONFIG_JAVA_UI
#include "tizen/src/display/maru_display.h"
# endif
+inline static bool is_maru_machine(MachineClass *mc) {
+ return g_str_has_prefix(mc->name, "maru");
+}
#endif
#define DEFAULT_RAM_SIZE 128
no_shutdown = 0;
#ifdef CONFIG_MARU
- qemu_system_graceful_shutdown_request(TIMEOUT_FOR_SHUTDOWN);
+ if (current_machine &&
+ is_maru_machine(MACHINE_GET_CLASS(current_machine))) {
+ qemu_system_graceful_shutdown_request(TIMEOUT_FOR_SHUTDOWN);
+ }
#else
qemu_system_shutdown_request();
#endif
}
#if defined(CONFIG_MARU)
- preallocated_ram_ptr = qemu_anon_ram_alloc(ram_size, NULL);
- if (preallocated_ram_ptr) {
- preallocated_ram_size = ram_size;
- }
+ if (is_maru_machine(machine_class)) {
+ preallocated_ram_ptr = qemu_anon_ram_alloc(ram_size, NULL);
+ if (preallocated_ram_ptr) {
+ preallocated_ram_size = ram_size;
+ }
- kernel_cmdline = qemu_opt_get(qemu_get_machine_opts(), "append");
- // Returned variable points different address from input variable.
- kernel_cmdline = prepare_maru(kernel_cmdline);
- qemu_opt_set(qemu_get_machine_opts(), "append", kernel_cmdline);
+ kernel_cmdline = qemu_opt_get(qemu_get_machine_opts(), "append");
+ // Returned variable points different address from input variable.
+ kernel_cmdline = prepare_maru(kernel_cmdline);
+ qemu_opt_set(qemu_get_machine_opts(), "append", kernel_cmdline);
+ }
#endif
/* Open the logfile at this point, if necessary. We can't open the logfile
}
if (display_type == DT_DEFAULT && !display_remote) {
-#if defined(CONFIG_MARU)
- // If no display_type is specified,
- // we use DT_MARU_QT_OFFSCREEN
-#if defined(CONFIG_QT)
- display_type = DT_MARU_QT_OFFSCREEN;
-#elif defined(CONFIG_SDL) && defined(CONFIG_JAVA_UI)
- display_type = DT_MARU_SDL;
-#elif defined(CONFIG_USE_SHM) && defined(CONFIG_JAVA_UI)
- display_type = DT_MARU_SHM;
-#endif
-#elif defined(CONFIG_GTK)
+#if defined(CONFIG_GTK)
display_type = DT_GTK;
#elif defined(CONFIG_SDL) || defined(CONFIG_COCOA)
display_type = DT_SDL;
exit(1);
#if defined(CONFIG_MARU)
- prepare_maru_after_device_init();
+ if (is_maru_machine(machine_class)) {
+ prepare_maru_after_device_init();
+ }
#endif
#ifdef CONFIG_VIGS
// To support legacy VIGS options
#if defined(CONFIG_JAVA_UI)
case DT_MARU_SDL:
case DT_MARU_SHM:
+ if (!is_maru_machine(machine_class)) {
+ error_report("maru_sdl or maru_shm can not work"
+ " without maru machine");
+ exit(1);
+ }
maru_display_init(ds, display_type, full_screen);
start_skin(skin_enabled);
break;
#if defined(CONFIG_QT)
case DT_MARU_QT_ONSCREEN:
case DT_MARU_QT_OFFSCREEN:
+ if (!is_maru_machine(machine_class)) {
+ error_report("maru_qt can not work"
+ " without maru machine");
+ exit(1);
+ }
maru_qt5_display_init(ds, full_screen);
break;
#endif