summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-11-28 19:24:07 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-11-28 19:24:07 +0000
commitb2e83f35aeed2abda8f30c63d565510bb84114d4 (patch)
tree2042f318e7c27f7b23ab107e5a6c60fda9e838fb /legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
parent7dd926fbae7d521f63ce39d9746d66f662496581 (diff)
Ecore_SDL : remove shadow var
SVN revision: 79786
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c b/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
index 3a80661229..31c0c9c8d5 100644
--- a/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
+++ b/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
@@ -123,7 +123,7 @@ _ecore_sdl_event_modifiers(int mod)
123} 123}
124 124
125static Ecore_Event_Key* 125static Ecore_Event_Key*
126_ecore_sdl_event_key(SDL_Event *event, double time) 126_ecore_sdl_event_key(SDL_Event *event, double timestamp)
127{ 127{
128 Ecore_Event_Key *ev; 128 Ecore_Event_Key *ev;
129 unsigned int i; 129 unsigned int i;
@@ -131,7 +131,7 @@ _ecore_sdl_event_key(SDL_Event *event, double time)
131 ev = malloc(sizeof(Ecore_Event_Key)); 131 ev = malloc(sizeof(Ecore_Event_Key));
132 if (!ev) return NULL; 132 if (!ev) return NULL;
133 133
134 ev->timestamp = time; 134 ev->timestamp = timestamp;
135 ev->window = 0; 135 ev->window = 0;
136 ev->event_window = 0; 136 ev->event_window = 0;
137 ev->modifiers = _ecore_sdl_event_modifiers(SDL_GetModState()); 137 ev->modifiers = _ecore_sdl_event_modifiers(SDL_GetModState());
@@ -155,11 +155,11 @@ EAPI void
155ecore_sdl_feed_events(void) 155ecore_sdl_feed_events(void)
156{ 156{
157 SDL_Event event; 157 SDL_Event event;
158 unsigned int time; 158 unsigned int timestamp;
159 159
160 while(SDL_PollEvent(&event)) 160 while(SDL_PollEvent(&event))
161 { 161 {
162 time = (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff); 162 timestamp = (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff);
163 switch(event.type) 163 switch(event.type)
164 { 164 {
165 case SDL_MOUSEMOTION: 165 case SDL_MOUSEMOTION:
@@ -169,7 +169,7 @@ ecore_sdl_feed_events(void)
169 ev = malloc(sizeof(Ecore_Event_Mouse_Move)); 169 ev = malloc(sizeof(Ecore_Event_Mouse_Move));
170 if (!ev) return ; 170 if (!ev) return ;
171 171
172 ev->timestamp = time; 172 ev->timestamp = timestamp;
173 ev->window = 0; 173 ev->window = 0;
174 ev->event_window = 0; 174 ev->event_window = 0;
175 ev->modifiers = 0; /* FIXME: keep modifier around. */ 175 ev->modifiers = 0; /* FIXME: keep modifier around. */
@@ -197,7 +197,7 @@ ecore_sdl_feed_events(void)
197 ev = malloc(sizeof(Ecore_Event_Mouse_Wheel)); 197 ev = malloc(sizeof(Ecore_Event_Mouse_Wheel));
198 if (!ev) return ; 198 if (!ev) return ;
199 199
200 ev->timestamp = time; 200 ev->timestamp = timestamp;
201 ev->window = 0; 201 ev->window = 0;
202 ev->event_window = 0; 202 ev->event_window = 0;
203 ev->modifiers = 0; /* FIXME: keep modifier around. */ 203 ev->modifiers = 0; /* FIXME: keep modifier around. */
@@ -213,7 +213,7 @@ ecore_sdl_feed_events(void)
213 ev = malloc(sizeof(Ecore_Event_Mouse_Button)); 213 ev = malloc(sizeof(Ecore_Event_Mouse_Button));
214 if (!ev) return ; 214 if (!ev) return ;
215 215
216 ev->timestamp = time; 216 ev->timestamp = timestamp;
217 ev->window = 0; 217 ev->window = 0;
218 ev->event_window = 0; 218 ev->event_window = 0;
219 ev->modifiers = 0; /* FIXME: keep modifier around. */ 219 ev->modifiers = 0; /* FIXME: keep modifier around. */
@@ -237,7 +237,7 @@ ecore_sdl_feed_events(void)
237 237
238 ev = malloc(sizeof(Ecore_Event_Mouse_Button)); 238 ev = malloc(sizeof(Ecore_Event_Mouse_Button));
239 if (!ev) return ; 239 if (!ev) return ;
240 ev->timestamp = time; 240 ev->timestamp = timestamp;
241 ev->window = 0; 241 ev->window = 0;
242 ev->event_window = 0; 242 ev->event_window = 0;
243 ev->modifiers = 0; /* FIXME: keep modifier around. */ 243 ev->modifiers = 0; /* FIXME: keep modifier around. */
@@ -281,11 +281,11 @@ ecore_sdl_feed_events(void)
281 EINA_RBTREE_CMP_KEY_CB(_ecore_sdl_pressed_node), NULL); 281 EINA_RBTREE_CMP_KEY_CB(_ecore_sdl_pressed_node), NULL);
282 if (entry) 282 if (entry)
283 { 283 {
284 ev = _ecore_sdl_event_key(&event, time); 284 ev = _ecore_sdl_event_key(&event, timestamp);
285 if (ev) ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL); 285 if (ev) ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL);
286 } 286 }
287 287
288 ev = _ecore_sdl_event_key(&event, time); 288 ev = _ecore_sdl_event_key(&event, timestamp);
289 if (ev) ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, NULL, NULL); 289 if (ev) ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, NULL, NULL);
290 290
291 if (!entry) 291 if (!entry)
@@ -314,7 +314,7 @@ ecore_sdl_feed_events(void)
314 free(entry); 314 free(entry);
315 } 315 }
316 316
317 ev = _ecore_sdl_event_key(&event, time); 317 ev = _ecore_sdl_event_key(&event, timestamp);
318 if (ev) ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL); 318 if (ev) ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL);
319 break; 319 break;
320 } 320 }