07/08/19 16:58:00 87LzenFa
>>197
PollEvent()内で、このような処理をしています。(ほかのイベントは省略しています)
while(SDL_PollEvent(&g_Event)){
switch(g_Event.type){
case SDL_ACTIVEEVENT:
if( (g_Event.active.state & SDL_APPINPUTFOCUS || g_Event.active.state & SDL_APPACTIVE) && g_Event.active.gain == 0 ){
g_WindowActive = false;
}
if( (g_Event.active.state & SDL_APPINPUTFOCUS || g_Event.active.state & SDL_APPACTIVE) && g_Event.active.gain == 1 ){
g_WindowActive = true;
}
break;
}
}
最小化からの復帰と別ウィンドウからフォーカスが移って再描画されるときはまた動き出すのですが
ウィンドウが完全に見えているときのフォーカスの変化に反応してくれないんです。