Skip to content

Commit

Permalink
Fix #18 fixed text screens freezing
Browse files Browse the repository at this point in the history
  • Loading branch information
tp9 committed Apr 1, 2013
1 parent 758077d commit adb04b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions battleship.py
Expand Up @@ -420,8 +420,8 @@ def show_help_screen():
def check_for_keypress():
# pulling out all KEYDOWN and KEYUP events from queue and returning any
# KEYUP else return None
for event in pygame.event.get([KEYDOWN, KEYUP]):
if event.type == KEYDOWN:
for event in pygame.event.get([KEYDOWN, KEYUP, MOUSEBUTTONDOWN, MOUSEBUTTONUP, MOUSEMOTION]):
if event.type in (KEYDOWN, MOUSEBUTTONUP, MOUSEBUTTONDOWN, MOUSEMOTION):
continue
return event.key
return None
Expand Down

0 comments on commit adb04b7

Please sign in to comment.