# for TIZEN-maru
maru="no"
+shm="no"
#
# parse CC options first
# for TIZEN-maru
--enable-maru) maru="yes"
;;
+ --enable-shm) shm="yes"
+ ;;
#
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
# for TIZEN-maru
echo "TIZEN-maru options:"
echo " --enable-maru enable maru board"
-echo ""
+echo " --enable-shm enable shared memory for framebuffer"
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi
# for TIZEN-maru
echo "TIZEN-maru support $maru"
+echo "TIZEN-maru shared framebuffer support $shm"
#
if test "$sdl_too_old" = "yes"; then
if test "$maru" = "yes" ; then
echo "CONFIG_MARU=y" >> $config_host_mak
fi
+if test "$shm" = "yes" ; then
+ echo "CONFIG_USE_SHM=y" >> $config_host_mak
+fi
if test "$gl" = "yes" ; then
echo "CONFIG_GL_BACKEND=y" >> $config_host_mak
fi
--enable-mixemu \
--audio-card-list=ac97 \
--enable-maru \
+ --enable-shm \
--enable-hax \
--disable-vnc \
--disable-cocoa \
#include "maru_common.h"
-#ifdef CONFIG_DARWIN
-//shared memory
-#define USE_SHM
-#endif
-
#include "hw.h"
#include "vga.h"
#include "console.h"
#include "debug_ch.h"
#include <pthread.h>
-#ifdef USE_SHM
+#ifdef CONFIG_USE_SHM
#include "emulator.h"
#include <sys/types.h>
#include <sys/ipc.h>
#include "maru_err_table.h"
#endif
-#ifdef USE_SHM
+#ifdef CONFIG_USE_SHM
void *shared_memory = (void*)0;
#endif
}
pthread_mutex_unlock(&mutex_screenshot);
-#ifdef USE_SHM
+#ifdef CONFIG_USE_SHM
memcpy(shared_memory, s->ds->surface->data,
s->ds->surface->linesize * s->ds->surface->height);
#endif
}
vga_dirty_log_start(s);
-#ifdef USE_SHM
+#ifdef CONFIG_USE_SHM
int mykey;
void *temp;
int shmid;
#include "maru_common.h"
-
-#ifdef CONFIG_DARWIN
-//shared memory
-#define USE_SHM
-#endif
-
#include "maru_display.h"
#include "debug_ch.h"
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
#include "maru_sdl.h"
#else
#include "maru_shm.h"
DisplayChangeListener *dcl;
dcl = g_malloc0(sizeof(DisplayChangeListener));
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
/* sdl library */
dcl->dpy_update = qemu_ds_sdl_update;
dcl->dpy_resize = qemu_ds_sdl_resize;
{
INFO("fini qemu display\n");
g_free(maru_screenshot);
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
maruskin_sdl_quit();
#else
//TODO:
void maruskin_init(uint64 swt_handle, int lcd_size_width, int lcd_size_height, bool is_resize)
{
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
maruskin_sdl_init(swt_handle, lcd_size_width, lcd_size_height, is_resize);
#else
maruskin_shm_init(swt_handle, lcd_size_width, lcd_size_height, is_resize);
}
DisplaySurface* get_qemu_display_surface(void) {
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
return maruskin_sdl_get_display();
#else
//TODO:
#include "maru_common.h"
-#ifdef CONFIG_DARWIN
-//shared memory
-#define USE_SHM
-#endif
-
#include <unistd.h>
#include <stdio.h>
#include <pthread.h>
TRACE("mouse_event button:%d, type:%d, host:(%d, %d), x:%d, y:%d, z:%d\n",
button_type, event_type, origin_x, origin_y, x, y, z);
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
/* multi-touch */
if (get_emul_multi_touch_state()->multitouch_enable == 1) {
maru_finger_processing_1(event_type, origin_x, origin_y, x, y);
TRACE("key_event event_type:%d, keycode:%d, state_mask:%d, key_location:%d\n",
event_type, keycode, state_mask, key_location);
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
//is multi-touch mode ?
if (get_emul_max_touch_point() > 1) {
int state_mask_temp = state_mask & ~JAVA_KEYCODE_NO_FOCUS;
#include "maru_common.h"
-#ifdef CONFIG_DARWIN
-//shared memory
-#define USE_SHM
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "emulator.h"
#include "maru_err_table.h"
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
#include "maru_sdl.h"
#endif
do_rotation_event( rotation_type );
}
-#ifndef USE_SHM
+#ifndef CONFIG_USE_SHM
maruskin_sdl_resize(); // send sdl event
#endif
break;