mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-12 00:59:12 +01:00
Fixed problems with zero-delay decoders.
This commit is contained in:
parent
e72c7dbb3a
commit
c168496b45
@ -9,5 +9,5 @@ public:
|
||||
virtual bool update(SDL_Event &e) = 0;
|
||||
virtual bool pressed() = 0;
|
||||
virtual void reset() = 0;
|
||||
virtual void updateKeystate() = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ public:
|
||||
bool update(SDL_Event &e);
|
||||
bool pressed();
|
||||
void reset();
|
||||
void updateKeystate() {};
|
||||
|
||||
private:
|
||||
SDL_JoystickID joyid_;
|
||||
|
||||
@ -9,6 +9,7 @@ public:
|
||||
bool update(SDL_Event &e);
|
||||
bool pressed();
|
||||
void reset();
|
||||
void updateKeystate() {};
|
||||
|
||||
private:
|
||||
SDL_JoystickID joynum_;
|
||||
|
||||
@ -9,6 +9,7 @@ public:
|
||||
bool update(SDL_Event &e);
|
||||
bool pressed();
|
||||
void reset();
|
||||
void updateKeystate() {};
|
||||
|
||||
private:
|
||||
SDL_JoystickID joynum_;
|
||||
|
||||
@ -29,3 +29,8 @@ bool KeyboardHandler::pressed()
|
||||
return pressed_;
|
||||
}
|
||||
|
||||
void KeyboardHandler::updateKeystate()
|
||||
{
|
||||
const Uint8 *state = SDL_GetKeyboardState(NULL);
|
||||
pressed_ = state[scancode_];
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ public:
|
||||
bool update(SDL_Event &e);
|
||||
bool pressed();
|
||||
void reset();
|
||||
void updateKeystate( );
|
||||
|
||||
private:
|
||||
SDL_Scancode scancode_;
|
||||
|
||||
@ -9,6 +9,7 @@ public:
|
||||
bool update(SDL_Event &e);
|
||||
bool pressed();
|
||||
void reset();
|
||||
void updateKeystate() {};
|
||||
|
||||
private:
|
||||
Uint8 button_;
|
||||
|
||||
@ -375,3 +375,17 @@ void UserInput::reconfigure( )
|
||||
keyHandlers_.clear();
|
||||
initialize( );
|
||||
}
|
||||
|
||||
|
||||
void UserInput::updateKeystate( )
|
||||
{
|
||||
for ( unsigned int i = 0; i < keyHandlers_.size( ); ++i )
|
||||
{
|
||||
InputHandler *h = keyHandlers_[i].first;
|
||||
if ( h )
|
||||
{
|
||||
h->updateKeystate( );
|
||||
currentKeyState_[keyHandlers_[i].second] |= h->pressed( );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,6 +68,7 @@ public:
|
||||
bool newKeyPressed(KeyCode_E code);
|
||||
void clearJoysticks( );
|
||||
void reconfigure( );
|
||||
void updateKeystate( );
|
||||
|
||||
private:
|
||||
bool MapKey(std::string keyDescription, KeyCode_E key);
|
||||
|
||||
@ -1213,6 +1213,8 @@ void RetroFE::run( )
|
||||
attract_.reset( );
|
||||
}
|
||||
currentPage_->update( deltaTime );
|
||||
SDL_PumpEvents( );
|
||||
input_.updateKeystate( );
|
||||
if (!splashMode)
|
||||
{
|
||||
if ( currentPage_->isAttractIdle( ) )
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
std::string retrofe_version_major = "0";
|
||||
std::string retrofe_version_minor = "9";
|
||||
std::string retrofe_version_build = "21";
|
||||
std::string retrofe_version_build = "22";
|
||||
|
||||
|
||||
std::string Version::getString( )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user