Tetris: use new event retreival function
This commit is contained in:
parent
2b2f5aa940
commit
ca4ccbebc8
@ -389,8 +389,7 @@ void handleKeyUpMain( SDL_Keycode key ) {
|
||||
|
||||
void pollEventsMain( SDLPP::Scene &scene ) {
|
||||
SDL_Event event;
|
||||
while ( SDL_PeepEvents(&event, 1, SDL_PEEKEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1 ) {
|
||||
SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||
while ( SDLPP::getSDLEvent( event ) ) {
|
||||
switch ( event.type ) {
|
||||
case SDL_QUIT:
|
||||
quitGame();
|
||||
@ -502,8 +501,7 @@ void handleKeyDownMenu( SDL_Keycode key ) {
|
||||
|
||||
void pollEventsMenu() {
|
||||
SDL_Event event;
|
||||
while ( SDL_PeepEvents(&event, 1, SDL_PEEKEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1 ) {
|
||||
SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||
while ( SDLPP::getSDLEvent( event ) ) {
|
||||
switch ( event.type ) {
|
||||
case SDL_QUIT:
|
||||
quitGame();
|
||||
@ -568,8 +566,7 @@ void handleKeyDownGameOver( SDL_Keycode key ) {
|
||||
|
||||
void pollEventsGameOver() {
|
||||
SDL_Event event;
|
||||
while ( SDL_PeepEvents(&event, 1, SDL_PEEKEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1 ) {
|
||||
SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||
while ( SDLPP::getSDLEvent( event ) ) {
|
||||
switch ( event.type ) {
|
||||
case SDL_QUIT:
|
||||
quitGame();
|
||||
@ -692,8 +689,7 @@ void handleKeyDownOptions( SDL_Keycode key ) {
|
||||
|
||||
void pollEventsOptions() {
|
||||
SDL_Event event;
|
||||
while ( SDL_PeepEvents(&event, 1, SDL_PEEKEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1 ) {
|
||||
SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||
while ( SDLPP::getSDLEvent( event ) ) {
|
||||
switch ( event.type ) {
|
||||
case SDL_QUIT:
|
||||
quitGame();
|
||||
|
Loading…
Reference in New Issue
Block a user