Add a wzDelay function to be used to delay things
parent
854b22c770
commit
aac6622fa3
|
@ -48,6 +48,7 @@ QList<QSize> wzAvailableResolutions(); ///< Get list of available resolutions.
|
|||
void wzSetSwapInterval(int swap);
|
||||
int wzGetSwapInterval();
|
||||
QString wzGetSelection();
|
||||
void wzDelay(unsigned int delay); //delay in ms
|
||||
|
||||
// Thread related
|
||||
WZ_THREAD *wzThreadCreate(int (*threadFunc)(void *), void *data);
|
||||
|
|
|
@ -361,6 +361,11 @@ void wzReleaseMouse()
|
|||
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
}
|
||||
|
||||
void wzDelay(unsigned int delay)
|
||||
{
|
||||
SDL_Delay(delay);
|
||||
}
|
||||
|
||||
/**************************/
|
||||
/*** Thread support ***/
|
||||
/**************************/
|
||||
|
|
|
@ -2577,6 +2577,7 @@ void kickPlayer(uint32_t player_id, const char *reason, LOBBY_ERROR_TYPES type)
|
|||
NETenum(&type);
|
||||
NETend();
|
||||
NETflush();
|
||||
wzDelay(300);
|
||||
debug(LOG_NET, "Kicking player %u (%s).",
|
||||
(unsigned int)player_id, getPlayerName(player_id));
|
||||
|
||||
|
|
Loading…
Reference in New Issue