move HandleSDLEvents to SDL_utils; the renderer is now responsible
for calling this
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -31,6 +31,8 @@ void mySDL_WM_SetIcon( CString sIconFile );
|
||||
SDL_Surface *SDLSurfaceFromRageSurface( RageSurface *surf );
|
||||
RageSurface *RageSurfaceFromSDLSurface( SDL_Surface *surf );
|
||||
|
||||
void HandleSDLEvents();
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user