move HandleSDLEvents to SDL_utils; the renderer is now responsible

for calling this
This commit is contained in:
Glenn Maynard
2004-06-14 03:11:39 +00:00
parent bc7a7b0d37
commit 47a277ce2b
2 changed files with 23 additions and 0 deletions
+21
View File
@@ -9,6 +9,8 @@
#include "RageUtil.h"
#include "RageSurface.h"
#include "RageSurfaceUtils.h"
#include "StepMania.h"
#include <errno.h>
/* Pull in all of our SDL libraries here. */
@@ -320,6 +322,25 @@ RageSurface *RageSurfaceFromSDLSurface( SDL_Surface *surf )
return ret;
}
void HandleSDLEvents()
{
/* This needs to be called before anything that handles SDL events. */
SDL_PumpEvents();
// process all queued events
SDL_Event event;
while(SDL_GetEvent(event, SDL_QUITMASK))
{
switch(event.type)
{
case SDL_QUIT:
LOG->Trace("SDL_QUIT: shutting down");
ExitGame();
break;
}
}
}
/*
* (c) 2002-2004 Glenn Maynard
* All rights reserved.
+2
View File
@@ -31,6 +31,8 @@ void mySDL_WM_SetIcon( CString sIconFile );
SDL_Surface *SDLSurfaceFromRageSurface( RageSurface *surf );
RageSurface *RageSurfaceFromSDLSurface( SDL_Surface *surf );
void HandleSDLEvents();
#endif
/*