correct render bug

Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
Vincent-FK 2020-01-07 13:23:32 +01:00
parent dd0d19bd38
commit a5a611af19

View File

@ -1103,6 +1103,8 @@ void RetroFE::run( )
// ------- Real render here -------
if(mustRender_){
//printf("render\n");
mustRender_ = false;
render( );
#ifdef PERIOD_FORCE_REFRESH
ticks_last_refresh = SDL_GetTicks();
@ -1259,15 +1261,16 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput( Page *page )
{
keyLastTime_ = 0;
keyDelayTime_= 0.3f;
forceRender(true);
}
else if ( (currentTime_ - keyLastTime_) > keyDelayTime_ || keyLastTime_ == 0 )
{
keyLastTime_ = currentTime_;
keyDelayTime_-= .05f;
if ( keyDelayTime_< 0.1f ) keyDelayTime_= 0.1f;
// All of these keys will mean new screen update => we must render
forceRender(true);
if (input_.keystate(UserInput::KeyCodePageUp))
{
attract_.reset( );