mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 16:25:54 +00:00
Fix stack overflow if SDL gamepad initialization fails
This commit is contained in:
parent
115ced7ab4
commit
165ad96be1
@ -137,6 +137,11 @@ ApplicationWindow {
|
|||||||
// Doing it earlier can lead to the dialog appearing behind
|
// Doing it earlier can lead to the dialog appearing behind
|
||||||
// the window or otherwise without input focus.
|
// the window or otherwise without input focus.
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
|
// Set initialized before calling anything else, because
|
||||||
|
// pumping the event loop can cause us to get another
|
||||||
|
// onAfterRendering call and potentially reenter this code.
|
||||||
|
initialized = true;
|
||||||
|
|
||||||
if (prefs.isRunningWayland()) {
|
if (prefs.isRunningWayland()) {
|
||||||
waylandDialog.open()
|
waylandDialog.open()
|
||||||
}
|
}
|
||||||
@ -152,8 +157,6 @@ ApplicationWindow {
|
|||||||
unmappedGamepadDialog.unmappedGamepads = unmappedGamepads
|
unmappedGamepadDialog.unmappedGamepads = unmappedGamepads
|
||||||
unmappedGamepadDialog.open()
|
unmappedGamepadDialog.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
initialized = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user