[Title] added scaling feature
authorgiwoong.kim <giwoong.kim@samsung.com>
Fri, 16 Mar 2012 14:08:04 +0000 (23:08 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Fri, 16 Mar 2012 14:08:04 +0000 (23:08 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/emulator.c
tizen/src/maru_sdl.c
tizen/src/skin/maruskin_operation.c [changed mode: 0755->0644]
tizen/src/skin/maruskin_server.c [changed mode: 0755->0644]

index 2930efe5c58037df5b8f4ef82b6b2f4daf433f74..5c02d1f69648bcfecf60fb5792dfa03bc7693518 100644 (file)
@@ -42,6 +42,7 @@
 #include "debug_ch.h"
 #include "process.h"
 #include "option.h"
+#include "emul_state.h"
 #ifdef _WIN32
 #include <winsock2.h>
 #endif
@@ -83,7 +84,7 @@ static void construct_main_window(int skin_argc, char* skin_argv[])
     INFO("construct main window\n");
 
     //TODO: init
-    set_emul_win_scale(100);
+    set_emul_win_scale(50);
     set_emul_rotation(0);
 
 
index b396eaf3efe138074fbec1539846d06f926a1db3..cf6d1bc43b790a0a27b450d589beac5a0d71850a 100644 (file)
@@ -54,9 +54,14 @@ static void qemu_update(void)
     pthread_mutex_lock(&sdl_mutex);
 #endif
 
-    SDL_BlitSurface(surface_qemu, NULL, surface_screen, NULL);
+    SDL_Surface *processing_screen;
+    processing_screen = rotozoomSurface(surface_qemu, 0.0, ((double)get_emul_win_scale()) / 100, 1);
+
+    SDL_BlitSurface(processing_screen, NULL, surface_screen, NULL);
     SDL_UpdateRect(surface_screen, 0, 0, 0, 0);
 
+    SDL_FreeSurface(processing_screen);
+
 #ifndef SDL_THREAD
     pthread_mutex_unlock(&sdl_mutex);
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index edd7f74..3a0bc87
@@ -38,6 +38,8 @@
 #include "sdb.h"
 #include "nbd.h"
 #include "../mloop_event.h"
+#include "emul_state.h"
+#include "sdl_rotate.h"
 
 #ifndef _WIN32
 #include "maruskin_keymap.h"
@@ -142,7 +144,7 @@ void do_hardkey_event( int event_type, int keycode ) {
 void do_scale_event( int event_type) {
     INFO( "do_scale_event event_type:%d", event_type);
 
-    double scale_factor = event_type / 100; //TODO: define
+    //double scale_factor = event_type / 100; //TODO: define
 
     //TODO:
 
old mode 100755 (executable)
new mode 100644 (file)
index f0186e4..6a1a212
@@ -47,6 +47,7 @@
 #include "maruskin_operation.h"
 #include "debug_ch.h"
 #include "qemu-thread.h"
+#include "emul_state.h"
 
 MULTI_DEBUG_CHANNEL( qemu, maruskin_server );