From: Holger Schemel Date: Wed, 8 Jan 2014 00:06:28 +0000 (+0100) Subject: rnd-20140108-1-src X-Git-Tag: 4.0.0.0-rc1~415 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=68d1418be737276c8214780106399c0dae588d1c;p=rocksndiamonds.git rnd-20140108-1-src * fixed problems related to fullscreen switching and window scaling * fixed inconsistent custom artwork contant numbering in src/main.h, src/screen.c and src/conf_gfx.c (this really should be cleaned up) (this bug caused custom artwork definition to set wrong variable) --- diff --git a/ChangeLog b/ChangeLog index 16157737..e04626b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-01-07 + * fixed problems related to fullscreen switching and window scaling + +2014-01-06 + * fixed inconsistent custom artwork contant numbering in src/main.h, + src/screen.c and src/conf_gfx.c (this really should be cleaned up) + (this bug caused custom artwork definition to set wrong variable) + 2014-01-05 * fixed using fullscreen mode on Android instead of pseudo-window mode * fixed keeping desktop fullscreen mode when changing viewport size diff --git a/src/conf_gfx.c b/src/conf_gfx.c index c9fe38cd..5e81ef42 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -5611,6 +5611,8 @@ struct ConfigInfo image_config[] = { "menu.draw_yoffset.SETUP[SHORTCUTS_3]", "0" }, { "menu.draw_xoffset.SETUP[SHORTCUTS_4]", "0" }, { "menu.draw_yoffset.SETUP[SHORTCUTS_4]", "0" }, + { "menu.draw_xoffset.SETUP[SHORTCUTS_5]", "0" }, + { "menu.draw_yoffset.SETUP[SHORTCUTS_5]", "0" }, { "menu.draw_xoffset.SETUP[CHOOSE_ARTWORK]", "0" }, { "menu.draw_yoffset.SETUP[CHOOSE_ARTWORK]", "0" }, { "menu.draw_xoffset.SETUP[CHOOSE_OTHER]", "0" }, diff --git a/src/conf_var.c b/src/conf_var.c index 059f3db6..e09bb0ff 100644 --- a/src/conf_var.c +++ b/src/conf_var.c @@ -1340,6 +1340,14 @@ struct TokenIntPtrInfo image_config_vars[] = "menu.draw_yoffset.SETUP[SHORTCUTS_4]", &menu.draw_yoffset_setup[GFX_SPECIAL_ARG_SETUP_SHORTCUTS_4] }, + { + "menu.draw_xoffset.SETUP[SHORTCUTS_5]", + &menu.draw_xoffset_setup[GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5] + }, + { + "menu.draw_yoffset.SETUP[SHORTCUTS_5]", + &menu.draw_yoffset_setup[GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5] + }, { "menu.draw_xoffset.SETUP[CHOOSE_ARTWORK]", &menu.draw_xoffset_setup[GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK] diff --git a/src/conftime.h b/src/conftime.h index 4a66c390..2227c40a 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-01-05 22:41" +#define COMPILE_DATE_STRING "2014-01-08 00:59" diff --git a/src/events.c b/src/events.c index ed910e64..4bbd8a52 100644 --- a/src/events.c +++ b/src/events.c @@ -162,6 +162,10 @@ void EventLoop(void) break; #if defined(TARGET_SDL2) + case SDL_WINDOWEVENT: + HandleWindowEvent((WindowEvent *) &event); + break; + case EVENT_FINGERPRESS: case EVENT_FINGERRELEASE: case EVENT_FINGERMOTION: @@ -388,13 +392,115 @@ void HandleMotionEvent(MotionEvent *event) motion_status = TRUE; +#if DEBUG_EVENTS Error(ERR_DEBUG, "MOTION EVENT: button %d moved, x/y %d/%d\n", button_status, event->x, event->y); +#endif HandleButton(event->x, event->y, button_status, button_status); } #if defined(TARGET_SDL2) +void HandleWindowEvent(WindowEvent *event) +{ + int subtype = event->event; + + char *event_name = + (subtype == SDL_WINDOWEVENT_SHOWN ? "SDL_WINDOWEVENT_SHOWN" : + subtype == SDL_WINDOWEVENT_HIDDEN ? "SDL_WINDOWEVENT_HIDDEN" : + subtype == SDL_WINDOWEVENT_EXPOSED ? "SDL_WINDOWEVENT_EXPOSED" : + subtype == SDL_WINDOWEVENT_MOVED ? "SDL_WINDOWEVENT_MOVED" : + subtype == SDL_WINDOWEVENT_SIZE_CHANGED ? "SDL_WINDOWEVENT_SIZE_CHANGED" : + subtype == SDL_WINDOWEVENT_RESIZED ? "SDL_WINDOWEVENT_RESIZED" : + subtype == SDL_WINDOWEVENT_MINIMIZED ? "SDL_WINDOWEVENT_MINIMIZED" : + subtype == SDL_WINDOWEVENT_MAXIMIZED ? "SDL_WINDOWEVENT_MAXIMIZED" : + subtype == SDL_WINDOWEVENT_RESTORED ? "SDL_WINDOWEVENT_RESTORED" : + subtype == SDL_WINDOWEVENT_ENTER ? "SDL_WINDOWEVENT_ENTER" : + subtype == SDL_WINDOWEVENT_LEAVE ? "SDL_WINDOWEVENT_LEAVE" : + subtype == SDL_WINDOWEVENT_FOCUS_GAINED ? "SDL_WINDOWEVENT_FOCUS_GAINED" : + subtype == SDL_WINDOWEVENT_FOCUS_LOST ? "SDL_WINDOWEVENT_FOCUS_LOST" : + subtype == SDL_WINDOWEVENT_CLOSE ? "SDL_WINDOWEVENT_CLOSE" : + "(UNKNOWN)"); + + Error(ERR_DEBUG, "WINDOW EVENT: '%s', %ld, %ld", + event_name, event->data1, event->data2); + + if (event->event == SDL_WINDOWEVENT_EXPOSED) + SDLRedrawWindow(); + +#if 0 + if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) + { + // if game started in fullscreen mode, window will also get fullscreen size + if (!video.fullscreen_enabled && video.fullscreen_initial) + { + SDLSetWindowScaling(setup.window_scaling_percent); + + // only do this correction once + video.fullscreen_initial = FALSE; + } + } +#endif + + if (event->event == SDL_WINDOWEVENT_RESIZED && !video.fullscreen_enabled) + { +#if 1 + int new_window_width = event->data1; + int new_window_height = event->data2; + + printf("::: RESIZED from %d, %d to %d, %d\n", + video.window_width, video.window_height, + new_window_width, new_window_height); + + // if window size has changed after resizing, calculate new scaling factor + if (new_window_width != video.window_width || + new_window_height != video.window_height) + { + int new_xpercent = (100 * new_window_width / video.width); + int new_ypercent = (100 * new_window_height / video.height); + + setup.window_scaling_percent = video.window_scaling_percent = + MIN(MAX(MIN_WINDOW_SCALING_PERCENT, MIN(new_xpercent, new_ypercent)), + MAX_WINDOW_SCALING_PERCENT); + + video.window_width = new_window_width; + video.window_height = new_window_height; + + printf("::: setup.window_scaling_percent set to %d\n", + setup.window_scaling_percent); + } +#else + // prevent slightly wrong scaling factor due to rounding differences + float scaling_factor = (float)setup.window_scaling_percent / 100; + int old_xsize = (int)(scaling_factor * video.width); + int old_ysize = (int)(scaling_factor * video.height); + int new_xsize = event->data1; + int new_ysize = event->data2; + + // window size is unchanged when going from fullscreen to window mode, + // but reverse calculation of scaling factor might result in a scaling + // factor that is slightly different due to rounding differences; + // therefore compare old/new window size and not old/new scaling factor + if (old_xsize != new_xsize || + old_ysize != new_ysize) + { + int new_xpercent = (100 * new_xsize / video.width); + int new_ypercent = (100 * new_ysize / video.height); + + setup.window_scaling_percent = MIN(new_xpercent, new_ypercent); + + if (setup.window_scaling_percent < MIN_WINDOW_SCALING_PERCENT) + setup.window_scaling_percent = MIN_WINDOW_SCALING_PERCENT; + else if (setup.window_scaling_percent > MAX_WINDOW_SCALING_PERCENT) + setup.window_scaling_percent = MAX_WINDOW_SCALING_PERCENT; + + printf("::: setup.window_scaling_percent set to %d\n", + setup.window_scaling_percent); + } +#endif + } +} + void HandleFingerEvent(FingerEvent *event) { #if 0 @@ -640,7 +746,9 @@ void HandleButton(int mx, int my, int button, int button_nr) if (IS_WHEEL_BUTTON(button_nr)) return; +#if 0 Error(ERR_DEBUG, "::: game_status == %d", game_status); +#endif switch (game_status) { @@ -984,6 +1092,31 @@ void HandleKey(Key key, int key_status) { setup.fullscreen = !setup.fullscreen; + printf("::: %d\n", setup.window_scaling_percent); + + ToggleFullscreenIfNeeded(); + + if (game_status == GAME_MODE_SETUP) + RedrawSetupScreenAfterFullscreenToggle(); + + return; + } + + if ((key == KSYM_minus || key == KSYM_plus || key == KSYM_0) && + (GetKeyModState() & KMOD_Control) && video.window_scaling_available && + !video.fullscreen_enabled) + { + if (key == KSYM_0) + setup.window_scaling_percent = STD_WINDOW_SCALING_PERCENT; + else + setup.window_scaling_percent += + (key == KSYM_minus ? -1 : +1) * STEP_WINDOW_SCALING_PERCENT; + + if (setup.window_scaling_percent < MIN_WINDOW_SCALING_PERCENT) + setup.window_scaling_percent = MIN_WINDOW_SCALING_PERCENT; + else if (setup.window_scaling_percent > MAX_WINDOW_SCALING_PERCENT) + setup.window_scaling_percent = MAX_WINDOW_SCALING_PERCENT; + ToggleFullscreenIfNeeded(); if (game_status == GAME_MODE_SETUP) diff --git a/src/events.h b/src/events.h index 7a6a7cb0..eb19b650 100644 --- a/src/events.h +++ b/src/events.h @@ -32,6 +32,7 @@ void HandleExposeEvent(ExposeEvent *); void HandleButtonEvent(ButtonEvent *); void HandleMotionEvent(MotionEvent *); #if defined(TARGET_SDL2) +void HandleWindowEvent(WindowEvent *); void HandleFingerEvent(FingerEvent *); void HandleTextEvent(TextEvent *); #endif diff --git a/src/init.c b/src/init.c index ae154457..723f8af0 100644 --- a/src/init.c +++ b/src/init.c @@ -6316,10 +6316,6 @@ void OpenAll() InitSetup(); -#if 1 - Error(ERR_INFO, "::: MARK 1: setup.fullscreen == %d", setup.fullscreen); -#endif - print_timestamp_time("[init setup/config stuff (1)]"); InitGameInfo(); @@ -6344,10 +6340,6 @@ void OpenAll() print_timestamp_time("[init setup/config stuff]"); -#if 1 - Error(ERR_INFO, "::: MARK 2: setup.fullscreen == %d", setup.fullscreen); -#endif - InitVideoDisplay(); InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen); diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index fbac7501..a9fd8959 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -393,9 +393,8 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer, SDL_Surface *new_surface = NULL; static boolean fullscreen_enabled = FALSE; - int surface_flags_window = SURFACE_FLAGS; #if defined(TARGET_SDL2) - + int surface_flags_window = SURFACE_FLAGS | SDL_WINDOW_RESIZABLE; #if USE_DESKTOP_FULLSCREEN int surface_flags_fullscreen = SURFACE_FLAGS | SDL_WINDOW_FULLSCREEN_DESKTOP; #else @@ -403,6 +402,7 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer, #endif #else + int surface_flags_window = SURFACE_FLAGS; int surface_flags_fullscreen = SURFACE_FLAGS | SDL_FULLSCREEN; #endif @@ -411,12 +411,27 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer, int surface_flags = (fullscreen ? surface_flags_fullscreen : surface_flags_window); + // default window size is unscaled + video.window_width = video.width; + video.window_height = video.height; + #if defined(TARGET_SDL2) + // store if initial screen mode on game start is fullscreen mode + if (sdl_window == NULL) + { + printf("::: GAME STARTS WITH FULLSCREEN %d\n", fullscreen); + + video.fullscreen_initial = fullscreen; + } + #if USE_RENDERER float window_scaling_factor = (float)setup.window_scaling_percent / 100; float screen_scaling_factor = (fullscreen ? 1 : window_scaling_factor); + video.window_width = window_scaling_factor * width; + video.window_height = window_scaling_factor * height; + #if 1 printf("::: use window scaling factor %f\n", screen_scaling_factor); #endif @@ -448,18 +463,25 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer, } } +#if 0 Error(ERR_INFO, "::: checking 'sdl_window' ..."); if (sdl_window == NULL) Error(ERR_INFO, "::: calling SDL_CreateWindow() [%d, %d, %d] ...", setup.fullscreen, fullscreen, fullscreen_enabled); +#endif if (sdl_window == NULL) sdl_window = SDL_CreateWindow(program.window_title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, +#if USE_DESKTOP_FULLSCREEN + video.window_width, + video.window_height, +#else (int)(screen_scaling_factor * width), (int)(screen_scaling_factor * height), +#endif surface_flags); if (sdl_window != NULL) @@ -748,7 +770,8 @@ boolean SDLSetVideoMode(DrawBuffer **backbuffer, boolean fullscreen) } #if defined(TARGET_SDL2) - UpdateScreen(NULL); // map window + SDLRedrawWindow(); // map window + // UpdateScreen(NULL); // map window #endif #if 1 @@ -772,6 +795,63 @@ boolean SDLSetVideoMode(DrawBuffer **backbuffer, boolean fullscreen) return success; } +#if defined(TARGET_SDL2) +void SDLSetWindowScaling(int window_scaling_percent) +{ + if (sdl_window == NULL) + return; + + float window_scaling_factor = (float)window_scaling_percent / 100; + int new_window_width = (int)(window_scaling_factor * video.width); + int new_window_height = (int)(window_scaling_factor * video.height); + + Error(ERR_DEBUG, "::: SDLSetWindowScaling(%d) ...", window_scaling_percent); + + SDL_SetWindowSize(sdl_window, new_window_width, new_window_height); + + video.window_scaling_percent = window_scaling_percent; + video.window_width = new_window_width; + video.window_height = new_window_height; +} + +void SDLSetWindowFullscreen(boolean fullscreen) +{ + if (sdl_window == NULL) + return; + +#if USE_DESKTOP_FULLSCREEN + int flags = (fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); +#else + int flags = (fullscreen ? SDL_WINDOW_FULLSCREEN : 0); +#endif + + Error(ERR_DEBUG, "::: SDL_SetWindowFullscreen(%d) ...", fullscreen); + + if (SDL_SetWindowFullscreen(sdl_window, flags) == 0) + video.fullscreen_enabled = fullscreen; + + printf("::: SDLSetWindowFullscreen: %d, %d\n", + fullscreen, video.fullscreen_initial); + +#if 1 + // if game started in fullscreen mode, window will also get fullscreen size + if (!fullscreen && video.fullscreen_initial) + { + SDLSetWindowScaling(setup.window_scaling_percent); + SDL_SetWindowPosition(sdl_window, + SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + + video.fullscreen_initial = FALSE; + } +#endif +} + +void SDLRedrawWindow() +{ + UpdateScreen(NULL); +} +#endif + void SDLCreateBitmapContent(Bitmap *new_bitmap, int width, int height, int depth) { diff --git a/src/libgame/sdl.h b/src/libgame/sdl.h index 244544d8..05ddfed6 100644 --- a/src/libgame/sdl.h +++ b/src/libgame/sdl.h @@ -86,6 +86,7 @@ typedef SDL_MouseMotionEvent MotionEvent; #if defined(TARGET_SDL2) typedef SDL_TouchFingerEvent FingerEvent; typedef SDL_TextInputEvent TextEvent; +typedef SDL_WindowEvent WindowEvent; #endif typedef SDL_KeyboardEvent KeyEvent; typedef SDL_Event ExposeEvent; @@ -436,6 +437,9 @@ struct MouseCursorInfo #if defined(TARGET_SDL2) SDL_Surface *SDL_DisplayFormat(SDL_Surface *); +void SDLSetWindowScaling(int); +void SDLSetWindowFullscreen(boolean); +void SDLRedrawWindow(); #endif void SDLInitVideoDisplay(void); diff --git a/src/libgame/system.c b/src/libgame/system.c index 59e5fd61..b6cdf649 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -438,9 +438,7 @@ void CloseVideoDisplay(void) void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) { -#if 0 - static boolean initialized = FALSE; -#endif + printf("::: InitVideoBuffer\n"); video.width = width; video.height = height; @@ -448,6 +446,7 @@ void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) video.fullscreen_available = FULLSCREEN_STATUS; video.fullscreen_enabled = FALSE; + // video.fullscreen_initial = FALSE; #if 0 video.fullscreen_mode_current = NULL; video.fullscreen_modes = NULL; @@ -455,13 +454,6 @@ void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) video.window_scaling_available = WINDOW_SCALING_STATUS; -#if 0 -#if defined(PLATFORM_ANDROID) - if (!initialized) - video.fullscreen_enabled = TRUE; -#endif -#endif - #if defined(TARGET_SDL) SDLInitVideoBuffer(&backbuffer, &window, fullscreen); #else @@ -469,10 +461,6 @@ void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) #endif drawto = backbuffer; - -#if 0 - initialized = TRUE; -#endif } inline static void FreeBitmapPointers(Bitmap *bitmap) diff --git a/src/libgame/system.h b/src/libgame/system.h index b9f65d14..dfa7a4f7 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -55,9 +55,10 @@ #define WINDOW_SCALING_NOT_AVAILABLE FALSE #define WINDOW_SCALING_AVAILABLE TRUE -#define MIN_WINDOW_SCALING_PERCENT 10 +#define MIN_WINDOW_SCALING_PERCENT 50 #define STD_WINDOW_SCALING_PERCENT 100 #define MAX_WINDOW_SCALING_PERCENT 300 +#define STEP_WINDOW_SCALING_PERCENT 10 /* default input keys */ #define DEFAULT_KEY_LEFT KSYM_Left @@ -732,9 +733,11 @@ struct VideoSystemInfo { int default_depth; int width, height, depth; + int window_width, window_height; boolean fullscreen_available; boolean fullscreen_enabled; + boolean fullscreen_initial; struct ScreenModeInfo *fullscreen_modes; char *fullscreen_mode_current; diff --git a/src/main.h b/src/main.h index 2bdefb22..ab6d8933 100644 --- a/src/main.h +++ b/src/main.h @@ -1885,6 +1885,8 @@ #define NUM_SPECIAL_GFX_INFO_ARGS 8 /* these additional definitions are currently only used for draw offsets */ +/* (must match SETUP_MODE_* values as defined in src/screens.c) */ +/* (should also match corresponding entries in src/conf_gfx.c) */ #define GFX_SPECIAL_ARG_SETUP_MAIN 0 #define GFX_SPECIAL_ARG_SETUP_GAME 1 #define GFX_SPECIAL_ARG_SETUP_EDITOR 2 @@ -1897,10 +1899,11 @@ #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_2 9 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_3 10 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_4 11 -#define GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK 12 -#define GFX_SPECIAL_ARG_SETUP_CHOOSE_OTHER 13 +#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5 12 +#define GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK 13 +#define GFX_SPECIAL_ARG_SETUP_CHOOSE_OTHER 14 -#define NUM_SPECIAL_GFX_SETUP_ARGS 14 +#define NUM_SPECIAL_GFX_SETUP_ARGS 15 /* values for image configuration suffixes */ diff --git a/src/screens.c b/src/screens.c index 3c9d2386..1a37d188 100644 --- a/src/screens.c +++ b/src/screens.c @@ -38,6 +38,8 @@ #define MAX_INFO_MODES 8 /* screens on the setup screen */ +/* (must match GFX_SPECIAL_ARG_SETUP_* values as defined in src/main.h) */ +/* (should also match corresponding entries in src/conf_gfx.c) */ #define SETUP_MODE_MAIN 0 #define SETUP_MODE_GAME 1 #define SETUP_MODE_EDITOR 2 @@ -6088,8 +6090,39 @@ void DrawSetupScreen() void RedrawSetupScreenAfterFullscreenToggle() { +#if 0 + if (setup_mode == SETUP_MODE_GRAPHICS || + setup_mode == SETUP_MODE_CHOOSE_WINDOW_SIZE) + { + if (window_sizes != NULL) + { + /* set current window size value to configured window size value */ + window_size_current = + getTreeInfoFromIdentifier(window_sizes, + i_to_a(setup.window_scaling_percent)); + + /* if that fails, set current window size to reliable default value */ + if (window_size_current == NULL) + window_size_current = + getTreeInfoFromIdentifier(window_sizes, + i_to_a(STD_WINDOW_SCALING_PERCENT)); + + /* if that also fails, set current window size to first available value */ + if (window_size_current == NULL) + window_size_current = window_sizes; + } + + setup.window_scaling_percent = atoi(window_size_current->identifier); + + /* needed for displaying window size text instead of identifier */ + window_size_text = window_size_current->name; + + DrawSetupScreen(); + } +#else if (setup_mode == SETUP_MODE_GRAPHICS) DrawSetupScreen(); +#endif } void HandleSetupScreen(int mx, int my, int dx, int dy, int button) diff --git a/src/tools.c b/src/tools.c index eefc5cb6..f71aacbd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -9000,6 +9000,24 @@ void ToggleFullscreenIfNeeded() if (!change_window_scaling_percent && !video.fullscreen_available) return; +#if defined(TARGET_SDL2) + if (change_window_scaling_percent) + { + SDLSetWindowScaling(setup.window_scaling_percent); + + return; + } + else if (change_fullscreen) + { + SDLSetWindowFullscreen(setup.fullscreen); + + /* set setup value according to successfully changed fullscreen mode */ + setup.fullscreen = video.fullscreen_enabled; + + return; + } +#endif + if (change_fullscreen || change_fullscreen_mode || change_window_scaling_percent) @@ -9024,7 +9042,7 @@ void ToggleFullscreenIfNeeded() /* toggle fullscreen */ ChangeVideoModeIfNeeded(setup.fullscreen); - /* set setup value according to successfully enabled fullscreen mode */ + /* set setup value according to successfully changed fullscreen mode */ setup.fullscreen = video.fullscreen_enabled; /* restore backbuffer content from temporary backbuffer backup bitmap */