From cfcf1b4a01f7ec93bef1c6ca25760e4b4ebd71dc Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Thu, 15 Mar 2012 12:04:21 +0900 Subject: [PATCH] [Title] added emul_config_info [Type] [Module] [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- tizen/src/emul_state.c | 33 +++++++++++++++++++++++---------- tizen/src/emul_state.h | 31 +++++++++++++++++++++---------- tizen/src/hw/maru_vga.c | 8 +++++++- tizen/src/maru_sdl.c | 5 +++-- 4 files changed, 54 insertions(+), 23 deletions(-) mode change 100755 => 100644 tizen/src/emul_state.c mode change 100755 => 100644 tizen/src/emul_state.h diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c old mode 100755 new mode 100644 index 89d1905..987ec75 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -29,16 +29,29 @@ * */ -/** - * @file emulator.h - * @brief - header of file these are config structures and defines in emulator - */ -#ifndef __MARU_COMMON_H__ -#define __MARU_COMMON_H__ +#include "emul_state.h" +#include "debug_ch.h" + +MULTI_DEBUG_CHANNEL(qemu, emul_state); + + +static emulator_config_info _emul_info; + +void set_emul_info_resolution(int width, int height) +{ + _emul_info.resolution_w = width; + _emul_info.resolution_h = height; + + INFO("emulator graphic resolution %dx%d\n", _emul_info.resolution_w, _emul_info.resolution_h); +} -#include -#include -#include +int get_emul_info_resolution_width(void) +{ + return _emul_info.resolution_w; +} -#endif /* __MARU_COMMON_H__ */ +int get_emul_info_resolution_height(void) +{ + return _emul_info.resolution_h; +} diff --git a/tizen/src/emul_state.h b/tizen/src/emul_state.h old mode 100755 new mode 100644 index 89d1905..51ed156 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@ -29,16 +29,27 @@ * */ -/** - * @file emulator.h - * @brief - header of file these are config structures and defines in emulator - */ -#ifndef __MARU_COMMON_H__ -#define __MARU_COMMON_H__ +#ifndef __EMUL_STATE_H__ +#define __EMUL_STATE_H__ + + +typedef struct emulator_config_info { + int resolution_w; + int resolution_h; +} emulator_config_info; + +struct emulator_config_state { + //TODO: +}; + + +/* setter */ +void set_emul_info_resolution(int width, int height); + +/* getter */ +int get_emul_info_resolution_width(void); +int get_emul_info_resolution_height(void); -#include -#include -#include -#endif /* __MARU_COMMON_H__ */ +#endif /* __EMUL_STATE_H__ */ diff --git a/tizen/src/hw/maru_vga.c b/tizen/src/hw/maru_vga.c index 5c8d1a1..7fbdb41 100644 --- a/tizen/src/hw/maru_vga.c +++ b/tizen/src/hw/maru_vga.c @@ -5,7 +5,7 @@ * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: - * Hyunjun Son + * HyunJun Son * GiWoong Kim * YeongKyoon Lee * @@ -38,6 +38,10 @@ #include "maru_vga_int.h" #include "maru_brightness.h" #include "maru_overlay.h" +#include "emul_state.h" +#include "debug_ch.h" + +MULTI_DEBUG_CHANNEL(qemu, maru_vga); //#define DEBUG_VGA //#define DEBUG_VGA_MEM @@ -897,6 +901,8 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) vga_sync_dirty_bitmap(s); s->get_resolution(s, &width, &height); + set_emul_info_resolution(width, height); + disp_width = width; shift_control = (s->gr[0x05] >> 5) & 3; diff --git a/tizen/src/maru_sdl.c b/tizen/src/maru_sdl.c index 850ccf6..1a74c6a 100644 --- a/tizen/src/maru_sdl.c +++ b/tizen/src/maru_sdl.c @@ -30,6 +30,7 @@ #include #include "maru_sdl.h" +#include "emul_state.h" #include "debug_ch.h" MULTI_DEBUG_CHANNEL(tizen, maru_sdl); @@ -183,8 +184,8 @@ void maruskin_sdl_init(int swt_handle) } INFO( "qemu_sdl_initialize\n"); - surface_screen = SDL_SetVideoMode(480, 800, 0, - SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_NOFRAME); + surface_screen = SDL_SetVideoMode(480, 800, + 0, SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_NOFRAME); #ifndef _WIN32 SDL_VERSION(&info.version); -- 2.7.4