[Title] added emul_config_info
authorgiwoong.kim <giwoong.kim@samsung.com>
Thu, 15 Mar 2012 03:04:21 +0000 (12:04 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Thu, 15 Mar 2012 03:04:21 +0000 (12:04 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/emul_state.c [changed mode: 0755->0644]
tizen/src/emul_state.h [changed mode: 0755->0644]
tizen/src/hw/maru_vga.c
tizen/src/maru_sdl.c

old mode 100755 (executable)
new mode 100644 (file)
index 89d1905..987ec75
  *
  */
 
-/**
- * @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 <stddef.h>
-#include <stdint.h>
-#include <stdbool.h>
+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;
+}
old mode 100755 (executable)
new mode 100644 (file)
index 89d1905..51ed156
  *
  */
 
-/**
- * @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 <stddef.h>
-#include <stdint.h>
-#include <stdbool.h>
 
-#endif /* __MARU_COMMON_H__ */
+#endif /* __EMUL_STATE_H__ */
index 5c8d1a16a9d54bc19b1828785c74adaa0893d547..7fbdb41cbd070c40094b7627ddf403fa7d849afe 100644 (file)
@@ -5,7 +5,7 @@
  * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
- * Hyunjun Son <hj79.son@samsung.com>
+ * HyunJun Son <hj79.son@samsung.com>
  * GiWoong Kim <giwoong.kim@samsung.com>
  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
  *
 #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;
index 850ccf64f6127d84097681661cfaa893b1e1dfb2..1a74c6a8cdebed95e55179346a33ff9fb926faa7 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <pthread.h>
 #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);