Recalculate camera projection matrix after aspect ratio change
parent
1519145c4c
commit
d4b431adaa
|
@ -399,6 +399,12 @@ void CEngine::ResetAfterDeviceChanged()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update the camera projection matrix for new aspect ratio
|
||||
SetFocus(m_focus);
|
||||
|
||||
// Because reloading textures takes a long time
|
||||
m_app->ResetTimeAfterLoading();
|
||||
}
|
||||
|
||||
bool CEngine::ProcessEvent(const Event &event)
|
||||
|
|
|
@ -304,8 +304,14 @@ void CRobotMain::ResetAfterDeviceChanged()
|
|||
m_phase == PHASE_SIMUL ||
|
||||
m_phase == PHASE_WIN ||
|
||||
m_phase == PHASE_LOST)
|
||||
ChangeColor();
|
||||
UpdateMap();
|
||||
{
|
||||
ChangeColor();
|
||||
UpdateMap();
|
||||
}
|
||||
|
||||
// Recreate the interface (needed if the aspect ratio changes)
|
||||
m_eventQueue->AddEvent(Event(EVENT_UPDINTERFACE));
|
||||
CreateShortcuts();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue