File: sdl-quit

package info (click to toggle)
gemdropx 0.9-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,100 kB
  • sloc: ansic: 1,772; cpp: 198; makefile: 73
file content (20 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: sdl-quit
 Add SDL_QUIT event
Author: William (Bill) Kendrick <bill@newbreedsoftware.com>
Bug-Debian: http://bugs.debian.org/299431
Reviewed-By: Christian T. Steigies <cts@debian.org>
Last-Update: 2005-03-19

--- gemdropx-0.9.orig/gemdropx.c
+++ gemdropx-0.9/gemdropx.c
@@ -1016,6 +1016,10 @@ void getkey(int handle_expose)
 	  
 	  key = event.key.keysym.sym;
 	}
+      else if (event.type == SDL_QUIT)
+        {
+          key = SDLK_ESCAPE;
+        }
       else if (event.type == SDL_MOUSEBUTTONDOWN)
 	{
 	  /* Mouse counts as keyboard: */