obj-y += vigs_log.o
obj-y += vigs_device.o
+libs_softmmu += $(GLX_LIBS)
obj-y += vigs_comm.o
obj-y += vigs_server.o
obj-y += vigs_backend.o
#include "qapi-types.h"
#include "qapi/error.h"
-#if defined(CONFIG_MARU) && !defined(CONFIG_USE_SHM)
+#if defined(CONFIG_MARU) && defined(CONFIG_SDL)
#define SDL_THREAD
#endif
endif
skin_client:
-# TIZEN_SDK_DEV_PATH=${TIZEN_SDK_DEV_PATH} ant -buildfile skin/client/build.xml make-jar
ifdef CONFIG_USE_SHM
TIZEN_SDK_DEV_PATH=${TIZEN_SDK_DEV_PATH} ant -DdoNotUseSHM=false -buildfile skin/client/build.xml make-jar
else
+ifdef CONFIG_SDL
TIZEN_SDK_DEV_PATH=${TIZEN_SDK_DEV_PATH} ant -DdoNotUseSHM=true -buildfile skin/client/build.xml make-jar
endif
+endif
build_info:
@echo "Generate a build information file"
endif
# resources and jar for skin
+ifdef CONFIG_SDL
cp -pP skin/client/emulator-skin.jar $(EMUL_DIR)/bin
cp -pPR skin/client/skins $(EMUL_DIR)
-ifndef CONFIG_USE_SHM
cp -pP skin/client/resource/images/blank-guide.png $(EMUL_DIR)/images
+else
+ifdef CONFIG_USE_SHM
+ cp -pP skin/client/emulator-skin.jar $(EMUL_DIR)/bin
+ cp -pPR skin/client/skins $(EMUL_DIR)
+endif
endif
# check capabilities of OpenGL and Webcam
# for dibs system...
all_dibs: qemu skin_client_dibs
skin_client_dibs:
-# ant -buildfile skin/client/build.xml -Dclasspath.dibs=$(ROOTDIR)/tools/emulator/bin make-jar-dibs
ifdef CONFIG_USE_SHM
TIZEN_SDK_DEV_PATH=${TIZEN_SDK_DEV_PATH} ant -DdoNotUseSHM=false ${DIBS_SWT_DIR} -buildfile skin/client/build.xml make-jar
else
+ifdef CONFIG_SDL
TIZEN_SDK_DEV_PATH=${TIZEN_SDK_DEV_PATH} ant -DdoNotNotUseSHM=true ${DIBS_SWT_DIR} -buildfile skin/client/build.xml make-jar
endif
+endif
install_dibs: all_dibs
endif
# resources and jar for skin
+ifdef CONFIG_SDL
cp -pP skin/client/emulator-skin.jar $(DIBS_COMMON_DIR)/bin
- #cp -pPR skin/client/skins $(DIBS_COMMON_DIR)
-ifndef CONFIG_USE_SHM
cp -pP skin/client/resource/images/blank-guide.png $(DIBS_COMMON_DIR)/images
+else
+ifdef CONFIG_USE_SHM
+ cp -pP skin/client/emulator-skin.jar $(DIBS_COMMON_DIR)/bin
+endif
endif
# check capabilities of OpenGL and Webcam
ifdef CONFIG_USE_SHM
obj-y += maru_shm.o
else
+ifdef CONFIG_SDL
obj-y += maru_sdl.o maru_sdl_processing.o maru_finger.o
endif
+endif
$(obj)/maru_display.o $(obj)/maru_sdl.o $(obj)/maru_sdl_processing.o $(obj)/maru_finger.o: QEMU_CFLAGS += $(SDL_CFLAGS)
#include "debug_ch.h"
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
#include "maru_sdl.h"
+#endif
#else
#include "maru_shm.h"
#endif
g_free(screenshot);
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
maru_sdl_quit();
+#endif
#else
maru_shm_quit();
#endif
INFO("init qemu display\n");
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
maru_sdl_pre_init();
+#endif
#else
/* do nothing */
#endif
DisplayChangeListener *dcl;
dcl = g_malloc0(sizeof(DisplayChangeListener));
+#if defined(CONFIG_USE_SHM) || defined(CONFIG_SDL)
+ //FIXME
dcl->ops = &maru_dcl_ops;
+#endif
register_displaychangelistener(dcl);
screenshot = g_malloc0(sizeof(MaruScreenShot));
void maru_display_resize(void)
{
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
maru_sdl_resize();
+#endif
#else
maru_shm_resize();
#endif
void maru_display_update(void)
{
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
maru_sdl_update();
+#endif
#else
/* do nothing */
#endif
void maru_display_invalidate(bool on)
{
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
maru_sdl_invalidate(on);
+#endif
#else
/* do nothing */
#endif
void maru_display_interpolation(bool on)
{
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
maru_sdl_interpolation(on);
+#endif
#else
/* do nothing */
#endif
bool blank_guide)
{
#ifndef CONFIG_USE_SHM
+#ifdef CONFIG_SDL
maru_sdl_init(swt_handle,
display_width, display_height, blank_guide);
+#endif
#else
maru_shm_init(swt_handle,
display_width, display_height, blank_guide);
#ifndef __MARU_FINGER_H__
#define __MARU_FINGER_H__
-#include "qemu-common.h"
-
+#include <stdint.h>
+#include <stdbool.h>
/* definitions relating to multi-touch */
#define MAX_FINGER_CNT 10
#include "hw/pci/maru_brightness.h"
#include "debug_ch.h"
+#include <SDL.h>
#ifndef CONFIG_WIN32
#include <SDL_syswm.h>
#endif
#ifndef MARU_SDL_H_
#define MARU_SDL_H_
-#include <SDL.h>
#include "ui/console.h"
extern DisplayChangeListenerOps maru_dcl_ops;
}
} else if (!strncmp(cmd, "TGesture", strlen("TGesture"))) {
/* release multi-touch */
-#ifndef CONFIG_USE_SHM
+#if !defined(CONFIG_USE_SHM) && defined(CONFIG_SDL)
if (get_multi_touch_enable() != 0) {
clear_finger_slot(false);
}
} EmulatorConfigState;
/* misc */
-extern gchar bin_path[];
+extern char bin_path[];
#ifdef SUPPORT_LEGACY_ARGS
-extern gchar log_path[];
+extern char log_path[];
#endif
char const *get_bin_path(void);
qemu_add_exit_notifier(notify);
}
+#ifdef CONFIG_SDL
static void construct_main_window(int skin_argc, char *skin_argv[],
int qemu_argc, char *qemu_argv[])
{
}
}
}
+#endif
static void get_host_proxy(char *http_proxy, char *https_proxy, char *ftp_proxy, char *socks_proxy)
{
return maru_kernel_cmdline;
}
+#ifdef CONFIG_SDL
void start_skin(void)
{
LOG_INFO("Start skin\n");
construct_main_window(_skin_argc, _skin_argv, _qemu_argc, _qemu_argv);
}
+#endif
int qemu_main(int argc, char **argv, char **envp);
int legacy_emulator_main(int argc, char **argv, char **envp);
return emulator_main(argc, argv, NULL);
}
#endif
-
#ifndef __EMULATOR_COMMON_H__
#define __EMULATOR_COMMON_H__
+#include <string.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
"host=(%d, %d), x=%d, y=%d, z=%d\n",
button_type, event_type, origin_x, origin_y, x, y, z);
-#ifndef CONFIG_USE_SHM
+#if !defined(CONFIG_USE_SHM) && defined(CONFIG_SDL)
/* multi-touch */
if (get_emul_multi_touch_state()->multitouch_enable == 1) {
maru_finger_processing_1(event_type, origin_x, origin_y, x, y);
"state_mask=%d, key_location=%d\n",
event_type, keycode, state_mask, key_location);
-#ifndef CONFIG_USE_SHM
+#if !defined(CONFIG_USE_SHM) && defined(CONFIG_SDL)
if (get_emul_max_touch_point() > 1) {
/* multi-touch checking */
int state_mask_temp = state_mask & ~JAVA_KEYCODE_NO_FOCUS;
#ifndef MARUSKIN_OPERATION_H_
#define MARUSKIN_OPERATION_H_
-#include "qemu-common.h"
-
+#include "stdint.h"
extern int ret_hax_init;
int data_length;
} DetailInfo;
-void start_display(uint64 handle_id,
+void start_display(uint64_t handle_id,
unsigned int display_width, unsigned int display_height,
double scale_factor, short rotation_type, bool blank_guide);
*
*/
+#include "qemu/queue.h"
+
typedef struct input_device_list {
int type;
void *opaque;
#include <webp/encode.h>
#endif
+#include "emulator_common.h"
#include "emul_state.h"
#include "skin/maruskin_operation.h"
#include "encode_fb.h"
#define EISCONN WSAEISCONN
#endif
-#include "qemu-common.h"
#include "qemu/main-loop.h"
#include "qemu/sockets.h"
#include "ui/console.h"
#endif
+#include "emulator_common.h"
#include "emul_state.h"
#include "sensor.h"
*
*/
+#include "emulator_common.h"
#include "emul_state.h"
#include "common.h"
#include "touch.h"
if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, 1) != 0)
exit(1);
+#ifdef CONFIG_VIGS
+ // To support legacy VIGS options
+ if (enable_vigs) {
+ PCIBus *pci_bus = (PCIBus *) object_resolve_path_type("", TYPE_PCI_BUS, NULL);
+ PCIDevice *pci_dev = pci_create(pci_bus, -1, "vigs");
+ if (vigs_backend) {
+ qdev_prop_set_string(&pci_dev->qdev, "backend", vigs_backend);
+ } else {
+ qdev_prop_set_string(&pci_dev->qdev, "backend", "gl");
+ }
+ qdev_prop_set_string(&pci_dev->qdev, "wsi", "wsi0");
+ qdev_init_nofail(&pci_dev->qdev);
+ }
+#endif
+#ifdef CONFIG_YAGL
+ // To support legacy YaGL options
+ if (enable_yagl) {
+ PCIBus *pci_bus = (PCIBus *) object_resolve_path_type("", TYPE_PCI_BUS, NULL);
+ PCIDevice *pci_dev = pci_create(pci_bus, -1, "yagl");
+ if (enable_vigs) {
+ qdev_prop_set_string(&pci_dev->qdev, "wsi", "wsi0");
+ }
+ qdev_init_nofail(&pci_dev->qdev);
+ }
+#endif
+
net_check_clients();
ds = init_displaystate();
break;
#endif
#if defined(CONFIG_MARU)
+#if defined(CONFIG_SDL)
case DT_MARU:
maru_display_init(ds);
if (skin_disabled == 1) {
start_skin();
break;
#endif
+#endif
#if defined(CONFIG_SDL)
case DT_SDL:
sdl_display_init(ds, full_screen, no_frame);
qemu_spice_display_init();
}
#endif
-#ifdef CONFIG_VIGS
- // To support legacy VIGS options
- if (enable_vigs) {
- PCIBus *pci_bus = (PCIBus *) object_resolve_path_type("", TYPE_PCI_BUS, NULL);
- PCIDevice *pci_dev = pci_create(pci_bus, -1, "vigs");
- if (vigs_backend) {
- qdev_prop_set_string(&pci_dev->qdev, "backend", vigs_backend);
- } else {
- qdev_prop_set_string(&pci_dev->qdev, "backend", "gl");
- }
- qdev_prop_set_string(&pci_dev->qdev, "wsi", "wsi0");
- qdev_init_nofail(&pci_dev->qdev);
- }
-#endif
-#ifdef CONFIG_YAGL
- // To support legacy YaGL options
- if (enable_yagl) {
- PCIBus *pci_bus = (PCIBus *) object_resolve_path_type("", TYPE_PCI_BUS, NULL);
- PCIDevice *pci_dev = pci_create(pci_bus, -1, "yagl");
- if (enable_vigs) {
- qdev_prop_set_string(&pci_dev->qdev, "wsi", "wsi0");
- }
- qdev_init_nofail(&pci_dev->qdev);
- }
-#endif
if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) {
exit(1);