replace SDL_BlitSurface by memcpy

Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
Vincent-FK 2019-12-21 01:22:38 +08:00
parent f76d500f4a
commit 8aef81685d
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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_);
}