equal
deleted
inserted
replaced
98 end; |
98 end; |
99 end; |
99 end; |
100 gsExit: begin |
100 gsExit: begin |
101 isTerminated:= true; |
101 isTerminated:= true; |
102 end; |
102 end; |
|
103 gsSuspend: exit; |
103 end; |
104 end; |
104 |
105 |
105 {$IFDEF SDL13} |
106 {$IFDEF SDL13} |
106 SDL_GL_SwapWindow(SDLwindow); |
107 SDL_GL_SwapWindow(SDLwindow); |
107 {$ELSE} |
108 {$ELSE} |
156 begin |
157 begin |
157 PrevTime:= SDL_GetTicks; |
158 PrevTime:= SDL_GetTicks; |
158 while isTerminated = false do |
159 while isTerminated = false do |
159 begin |
160 begin |
160 SDL_PumpEvents(); |
161 SDL_PumpEvents(); |
161 {$IFDEF SDL13} |
162 {$IFDEF SDL13} |
162 while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0 do |
163 while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0 do |
163 {$ELSE} |
164 {$ELSE} |
164 while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_ALLEVENTS) > 0 do |
165 while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_ALLEVENTS) > 0 do |
165 {$ENDIF} |
166 {$ENDIF} |
166 begin |
167 begin |
167 case event.type_ of |
168 case event.type_ of |
168 SDL_KEYDOWN: if GameState = gsChat then |
169 SDL_KEYDOWN: if GameState = gsChat then |
169 {$IFDEF SDL13} |
170 {$IFDEF SDL13} |
170 // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3 |
171 // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3 |