git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6726 c06c8d41-db1a-0410-9941-cceddc491573
RZTIYZABUF6FQZEBZOPVWTIMYI3ZI637PTR4MZTBPLOCDRAXPPOQC
HICDAROOX7333JJXSSXOVZPALK5C7XCVMTGKT5DSS2SZKWXRT4NQC
PEZFWKRHDHV4UJTPK5XJZ3CGTZ3LPTDYSPTYBENLQ7VRSP7YFSIQC
Q3B3UVMYEVC4YJUPYVSNTR4DJH4E6J4JJDHZNT5LNOCHCPPMEMXAC
// drive that I'm using sets this to the last colour of the
// driver that I'm using sets this to the last colour of the
if (SDL_Init(SDL_INIT_VIDEO) != 0)
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0)
}static unsigned int _timer_callback(unsigned int ticks){ // force the event loop to break SDL_Event event; event.type = SDL_USEREVENT; SDL_PushEvent(&event); unsigned int res = std::max(30, Options.tile_tooltip_ms); return res;
}
static unsigned int _timer_callback(unsigned int ticks)
{
// force the event loop to break
SDL_Event event;
event.type = SDL_USEREVENT;
SDL_PushEvent(&event);
unsigned int res = std::max(30, Options.tile_tooltip_ms);
return res;
unsigned int res = std::max(30, Options.tile_tooltip_ms); SDL_SetTimer(res, &_timer_callback);
SDL_SetTimer(res, &_timer_callback);
unsigned int ticks = SDL_GetTicks();
unsigned int ticks;
if (SDL_PollEvent(&event))
if (SDL_WaitEvent(&event))
tiles.clear_text_tags(TAG_CELL_DESC); switch(event.type)
tiles.clear_text_tags(TAG_CELL_DESC);
switch(event.type)
ticks = SDL_GetTicks(); if (event.type != SDL_USEREVENT) tiles.clear_text_tags(TAG_CELL_DESC); switch (event.type)
ticks = SDL_GetTicks();
if (event.type != SDL_USEREVENT)
switch (event.type)
// This is only used to refresh the tooltip.
SDL_SetTimer(0, NULL);