1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| void Window::prout()
{
MessageBox( NULL, "windows::prout", "Warning", MB_OK );
int val;
SDL_Event ue;
for(int i=0; i < 20; ++i)
{
MessageBox( NULL, "windows::iteration", "Warning", MB_OK );
ue.type = SDL_USEREVENT;
ue.user.code = 0;
ue.user.data1 = (void*)i;
ue.user.data2 = 0;
SDL_LockMutex(Threads::GUIEventLock());
while ((-1 == (val = SDL_PushEvent(&ue))))
{
SDL_CondWait(Threads::GUIEventWait(), Threads::GUIEventLock());
}
SDL_UnlockMutex(Threads::GUIEventLock());
SDL_CondSignal(Threads::GUIEventWait());
}
} |
Partager