/*
- * Emulator
+ * Emulator State Information
*
* Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
return _emul_info.skin_enable;
}
-/* display screen size */
-void set_emul_lcd_size(int width, int height)
+/* display screen resolution */
+void set_emul_resolution(int width, int height)
{
- _emul_info.lcd_size_w = width;
- _emul_info.lcd_size_h = height;
+ _emul_info.resolution_w = width;
+ _emul_info.resolution_h = height;
INFO("emulator graphic resolution : %dx%d\n",
- _emul_info.lcd_size_w, _emul_info.lcd_size_h);
+ _emul_info.resolution_w, _emul_info.resolution_h);
}
-int get_emul_lcd_width(void)
+int get_emul_resolution_width(void)
{
- return _emul_info.lcd_size_w;
+ return _emul_info.resolution_w;
}
-int get_emul_lcd_height(void)
+int get_emul_resolution_height(void)
{
- return _emul_info.lcd_size_h;
+ return _emul_info.resolution_h;
}
/* sdl bits per pixel */
/*
- * Emulator
+ * Emulator State Information
*
* Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
typedef struct EmulatorConfigInfo {
int skin_enable;
- int lcd_size_w;
- int lcd_size_h;
+ int resolution_w;
+ int resolution_h;
int sdl_bpp;
bool input_mouse_enable;
bool input_touch_enable;
/* setter */
void set_emul_skin_enable(int enable);
-void set_emul_lcd_size(int width, int height);
+void set_emul_resolution(int width, int height);
void set_emul_win_scale(double scale);
void set_emul_sdl_bpp(int bpp);
void set_emul_input_mouse_enable(bool on);
/* getter */
int get_emul_skin_enable(void);
-int get_emul_lcd_width(void);
-int get_emul_lcd_height(void);
+int get_emul_resolution_width(void);
+int get_emul_resolution_height(void);
double get_emul_win_scale(void);
int get_emul_sdl_bpp(void);
bool is_emul_input_mouse_enable(void);
}
if (w != 0 && h != 0) {
- set_emul_lcd_size(w, h);
+ set_emul_resolution(w, h);
break;
}
}
int distance_x = x - finger->x;
int distance_y = y - finger->y;
- int current_screen_w = get_emul_lcd_width();
- int current_screen_h = get_emul_lcd_height();
+ int current_screen_w = get_emul_resolution_width();
+ int current_screen_h = get_emul_resolution_height();
int temp_finger_x, temp_finger_y;
int i = 0;
}
/* create surface_qemu */
- if (console_width == get_emul_lcd_width() &&
- console_height == get_emul_lcd_height()) {
+ if (console_width == get_emul_resolution_width() &&
+ console_height == get_emul_resolution_height()) {
INFO("create SDL screen : (%d, %d)\n",
console_width, console_height);
dpy_surface->pf.amask);
} else {
INFO("create blank screen : (%d, %d)\n",
- get_emul_lcd_width(), get_emul_lcd_height());
+ get_emul_resolution_width(), get_emul_resolution_height());
surface_qemu = SDL_CreateRGBSurface(
SDL_SWSURFACE,
#endif
/* get current setting information and calculate screen size */
- display_width = get_emul_lcd_width();
- display_height = get_emul_lcd_height();
+ display_width = get_emul_resolution_width();
+ display_height = get_emul_resolution_height();
current_scale_factor = get_emul_win_scale();
short rotaton_type = get_emul_rotation();
/* rearrange multi-touch finger points */
if (get_emul_multi_touch_state()->multitouch_enable == 1 ||
get_emul_multi_touch_state()->multitouch_enable == 2) {
- rearrange_finger_points(get_emul_lcd_width(), get_emul_lcd_height(),
+ rearrange_finger_points(get_emul_resolution_width(), get_emul_resolution_height(),
current_scale_factor, rotaton_type);
}
INFO("register SDL environment variable. "
"(SDL_WINDOWID = %s)\n", SDL_windowhack);
- set_emul_lcd_size(display_width, display_height);
+ set_emul_resolution(display_width, display_height);
set_emul_sdl_bpp(SDL_BPP);
init_multi_touch_state();
surface_height(dpy_surface));
} else {
int shm_size =
- get_emul_lcd_width() * get_emul_lcd_height() * 4;
+ get_emul_resolution_width() * get_emul_resolution_height() * 4;
memset(shared_memory, 0x00, (size_t)shm_size);
}
INFO("qemu_ds_shm_switch : (%d, %d)\n",
console_width, console_height);
- if (console_width == get_emul_lcd_width() &&
- console_height == get_emul_lcd_height()) {
+ if (console_width == get_emul_resolution_width() &&
+ console_height == get_emul_resolution_height()) {
is_fit_console_size = true;
}
}
INFO("maru shm init\n");
- set_emul_lcd_size(display_width, display_height);
+ set_emul_resolution(display_width, display_height);
set_emul_sdl_bpp(32);
if (blank_guide_enable == true) {
/* byte */
int shm_size =
- get_emul_lcd_width() * get_emul_lcd_height() * 4;
+ get_emul_resolution_width() * get_emul_resolution_height() * 4;
/* base + 1 = sdb port */
/* base + 2 = shared memory key */
return NULL;
}
- int length = get_emul_lcd_width() * get_emul_lcd_height() * 4;
+ int length = get_emul_resolution_width() * get_emul_resolution_height() * 4;
INFO("screenshot data length:%d\n", length);
if (0 >= length) {