Commit 9d43c38e by xiongziliang

add exit event

parent 91adaaaa
......@@ -71,20 +71,26 @@ public:
SDL_Event event;
while(flag){
SDL_WaitEvent(&event);
if (event.type == REFRESH_EVENT)
{
{
lock_guard<mutex> lck(_mtxTask);
if(_taskList.empty()){
//not reachable
continue;
}
task = _taskList.front();
_taskList.pop_front();
}
flag = task();
}
switch (event.type){
case REFRESH_EVENT:{
{
lock_guard<mutex> lck(_mtxTask);
if(_taskList.empty()){
//not reachable
continue;
}
task = _taskList.front();
_taskList.pop_front();
}
flag = task();
break;
case SDL_QUIT:
InfoL << event.type;
return;
}
default:
break;
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论