During launchExit (returning from a game), empty the input event queue, and

reset the scrolling text.
This commit is contained in:
Pieter Hulshoff 2016-12-30 00:32:28 +01:00
parent 22ef2b31fe
commit c6c21ea0ff
3 changed files with 12 additions and 0 deletions

View File

@ -94,6 +94,12 @@ void ReloadableScrollingText::update(float dt)
}
void ReloadableScrollingText::launchExit( )
{
reloadTexture( );
}
void ReloadableScrollingText::freeGraphicsMemory( )
{
Component::freeGraphicsMemory( );

View File

@ -29,6 +29,7 @@ public:
void update(float dt);
void draw( );
void freeGraphicsMemory( );
void launchExit();
private:
void reloadTexture( );

View File

@ -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();