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