From 8aef81685d459a4f60e8fc8bea3fc955be4cb271 Mon Sep 17 00:00:00 2001 From: Vincent-FK Date: Sat, 21 Dec 2019 01:22:38 +0800 Subject: [PATCH] replace SDL_BlitSurface by memcpy Signed-off-by: Vincent-FK --- RetroFE/Source/RetroFE.cpp | 2 +- RetroFE/Source/SDL.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index eec10b9..0a4c991 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -59,7 +59,7 @@ #define FUNKEY_ALL_POLLEVENT_DELAY 30 //ms //#define PERIOD_FORCE_REFRESH 1000 //ms -#define FPS 30 // TODO: set in conf file +#define FPS 60 // TODO: set in conf file //#define DEBUG_FPS #ifdef DEBUG_FPS diff --git a/RetroFE/Source/SDL.cpp b/RetroFE/Source/SDL.cpp index 8dc83df..af24b33 100644 --- a/RetroFE/Source/SDL.cpp +++ b/RetroFE/Source/SDL.cpp @@ -357,7 +357,8 @@ void SDL::SDL_Rotate_270(SDL_Surface * src, SDL_Surface * dst){ void SDL::renderAndFlipWindow( ) { //SDL_BlitSurface(window_virtual_, NULL, window_, NULL); - SDL_Rotate_270(window_virtual_, window_); + memcpy(window_->pixels, window_virtual_->pixels, window_->h*window_->w*sizeof(uint32_t)); + //SDL_Rotate_270(window_virtual_, window_); SDL_Flip(window_); }