mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-09 09:48:43 +00:00
Don't set currentIndex to -1 while reinitializing
It causes warnings in other code that have property bindings to currentIndex
This commit is contained in:
parent
b7301d4415
commit
c6a8f44640
1 changed files with 3 additions and 2 deletions
|
@ -593,19 +593,20 @@ Flickable {
|
|||
}
|
||||
|
||||
var saved_fps = StreamingPreferences.fps
|
||||
currentIndex = -1
|
||||
var found = false
|
||||
for (var i = 0; i < model.count; i++) {
|
||||
var el_fps = parseInt(model.get(i).video_fps);
|
||||
|
||||
// Look for a matching frame rate
|
||||
if (saved_fps === el_fps) {
|
||||
currentIndex = i
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// If we didn't find one, add a custom frame rate for the current value
|
||||
if (currentIndex === -1) {
|
||||
if (!found) {
|
||||
currentIndex = addRefreshRateOrdered(model, saved_fps, qsTr("Custom (%1 FPS)").arg(saved_fps), true)
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue