fix crash on back from gameplay on first frame

This commit is contained in:
Glenn Maynard
2004-02-19 03:20:11 +00:00
parent c2c0970a40
commit f4503b0e7f
+8
View File
@@ -31,6 +31,7 @@
#include "SDL_utils.h"
#include "Screen.h"
#include "CodeDetector.h"
//
@@ -1273,6 +1274,13 @@ static void HandleInputEvents(float fDeltaTime)
{
INPUTFILTER->Update( fDeltaTime );
/* Hack: If the topmost screen hasn't been updated yet, don't process input, since
* we must not send inputs to a screen that hasn't at least had one update yet. (The
* first Update should be the very first thing a screen gets.) We'll process it next
* time. Do call Update above, so the inputs are read and timestamped. */
if( SCREENMAN->GetTopScreen()->IsFirstUpdate() )
return;
static InputEventArray ieArray;
ieArray.clear(); // empty the array
INPUTFILTER->GetInputEvents( ieArray );