[Vulkan] Better handling of device lost events (present fatal error dialog)

This commit is contained in:
DrChat
2017-12-18 14:27:00 -06:00
parent 76b577148d
commit b5d647d540
14 changed files with 154 additions and 65 deletions

View File

@@ -198,6 +198,11 @@ void Window::OnPaint(UIEvent* e) {
ImGui::NewFrame();
context_->BeginSwap();
if (context_->WasLost()) {
on_context_lost(e);
return;
}
ForEachListener([e](auto listener) { listener->OnPainting(e); });
on_painting(e);
ForEachListener([e](auto listener) { listener->OnPaint(e); });