mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-31 11:08:51 +01:00
During launchExit (returning from a game), empty the input event queue, and
reset the scrolling text.
This commit is contained in:
parent
22ef2b31fe
commit
c6c21ea0ff
@ -94,6 +94,12 @@ void ReloadableScrollingText::update(float dt)
|
||||
}
|
||||
|
||||
|
||||
void ReloadableScrollingText::launchExit( )
|
||||
{
|
||||
reloadTexture( );
|
||||
}
|
||||
|
||||
|
||||
void ReloadableScrollingText::freeGraphicsMemory( )
|
||||
{
|
||||
Component::freeGraphicsMemory( );
|
||||
|
||||
@ -29,6 +29,7 @@ public:
|
||||
void update(float dt);
|
||||
void draw( );
|
||||
void freeGraphicsMemory( );
|
||||
void launchExit();
|
||||
|
||||
private:
|
||||
void reloadTexture( );
|
||||
|
||||
@ -135,6 +135,11 @@ void RetroFE::launchExit()
|
||||
SDL_RestoreWindow(SDL::getWindow());
|
||||
SDL_RaiseWindow(SDL::getWindow());
|
||||
SDL_SetWindowGrab(SDL::getWindow(), SDL_TRUE);
|
||||
|
||||
// Empty event queue
|
||||
SDL_Event e;
|
||||
while (SDL_PollEvent(&e));
|
||||
|
||||
input_.resetStates();
|
||||
attract_.reset();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user