Close program when Wayland connection hangs up

This change ensures that SuperTuxKart will not keep running in the
background when the compositor crashes and doesn't close the STK
main window.
This commit is contained in:
Manuel Stoeckl 2019-07-11 19:36:10 -04:00
parent ac99ace874
commit 1686a9e45b

View File

@ -1283,7 +1283,10 @@ bool CIrrDeviceWayland::run()
{ {
os::Timer::tick(); os::Timer::tick();
wl_display_dispatch_pending(m_display); if (wl_display_dispatch_pending(m_display) == -1)
{
closeDevice();
}
for (unsigned int i = 0; i < m_events.size(); i++) for (unsigned int i = 0; i < m_events.size(); i++)
{ {