summaryrefslogtreecommitdiff
path: root/bsp/simulator/drivers
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-11-16 03:22:03 +0000
committer[email protected] <[email protected]>2012-11-16 03:22:03 +0000
commit3012a3abb563c70fc2159c8e5bb4d260dc4a960e (patch)
treea29587dc4a05b8f1e41af54821fd26aef7355cde /bsp/simulator/drivers
parent3112b09c8f37a430a206af50e93f6bbbf419b430 (diff)
use the event-wait to replace the event poll when get the sdl's event
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2416 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/simulator/drivers')
-rw-r--r--bsp/simulator/drivers/sdl_fb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bsp/simulator/drivers/sdl_fb.c b/bsp/simulator/drivers/sdl_fb.c
index 01417d7f47..1db3c3cf9d 100644
--- a/bsp/simulator/drivers/sdl_fb.c
+++ b/bsp/simulator/drivers/sdl_fb.c
@@ -151,8 +151,8 @@ static DWORD WINAPI sdl_loop(LPVOID lpParam)
/* handle SDL event */
while(!quit)
{
- while ( SDL_PollEvent(&event) )
- {
+ SDL_WaitEvent(&event);
+
switch (event.type)
{
case SDL_MOUSEMOTION:
@@ -267,8 +267,6 @@ static DWORD WINAPI sdl_loop(LPVOID lpParam)
break;
}
- SDL_Delay(20);
- }
if (quit)
break;
}