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
This commit is contained in:
parent
3112b09c8f
commit
3012a3abb5
|
@ -151,8 +151,8 @@ static DWORD WINAPI sdl_loop(LPVOID lpParam)
|
||||||
/* handle SDL event */
|
/* handle SDL event */
|
||||||
while(!quit)
|
while(!quit)
|
||||||
{
|
{
|
||||||
while ( SDL_PollEvent(&event) )
|
SDL_WaitEvent(&event);
|
||||||
{
|
|
||||||
switch (event.type)
|
switch (event.type)
|
||||||
{
|
{
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
|
@ -267,8 +267,6 @@ static DWORD WINAPI sdl_loop(LPVOID lpParam)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Delay(20);
|
|
||||||
}
|
|
||||||
if (quit)
|
if (quit)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue