mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-13 04:42:27 +00:00
Fix undefined variable usage after 2703efedef
This commit is contained in:
parent
fa4c0e82bd
commit
c48ed7bb0d
2 changed files with 9 additions and 7 deletions
|
@ -191,28 +191,30 @@ Flickable {
|
|||
function createModel() {
|
||||
var fpsListModel = Qt.createQmlObject('import QtQuick 2.0; ListModel {}', parent, '')
|
||||
|
||||
var max_fps = SystemProperties.maximumStreamingFrameRate
|
||||
|
||||
// Default entries
|
||||
fpsListModel.append({"text": "30 FPS", "video_fps": "30"})
|
||||
fpsListModel.append({"text": "60 FPS", "video_fps": "60"})
|
||||
|
||||
// Add unsupported FPS values that come before the display max FPS
|
||||
if (prefs.unsupportedFps) {
|
||||
if (SystemProperties.maximumStreamingFrameRate > 90) {
|
||||
if (max_fps > 90) {
|
||||
fpsListModel.append({"text": "90 FPS (Unsupported)", "video_fps": "90"})
|
||||
}
|
||||
if (SystemProperties.maximumStreamingFrameRate > 120) {
|
||||
if (max_fps > 120) {
|
||||
fpsListModel.append({"text": "120 FPS (Unsupported)", "video_fps": "120"})
|
||||
}
|
||||
}
|
||||
|
||||
// Use 64 as the cutoff for adding a separate option to
|
||||
// handle wonky displays that report just over 60 Hz.
|
||||
if (SystemProperties.maximumStreamingFrameRate > 64) {
|
||||
if (max_fps > 64) {
|
||||
// Mark any FPS value greater than 120 as unsupported
|
||||
if (prefs.unsupportedFps && max_fps > 120) {
|
||||
fpsListModel.append({"text": max_fps+" FPS (Unsupported)", "video_fps": ""+max_fps})
|
||||
}
|
||||
else if (SystemProperties.maximumStreamingFrameRate > 120) {
|
||||
else if (max_fps > 120) {
|
||||
fpsListModel.append({"text": "120 FPS", "video_fps": "120"})
|
||||
}
|
||||
else {
|
||||
|
@ -222,10 +224,10 @@ Flickable {
|
|||
|
||||
// Add unsupported FPS values that come after the display max FPS
|
||||
if (prefs.unsupportedFps) {
|
||||
if (SystemProperties.maximumStreamingFrameRate < 90) {
|
||||
if (max_fps < 90) {
|
||||
fpsListModel.append({"text": "90 FPS (Unsupported)", "video_fps": "90"})
|
||||
}
|
||||
if (SystemProperties.maximumStreamingFrameRate < 120) {
|
||||
if (max_fps < 120) {
|
||||
fpsListModel.append({"text": "120 FPS (Unsupported)", "video_fps": "120"})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ int NullThreadedVsyncSource::vsyncThread(void* context)
|
|||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_TIME_CRITICAL);
|
||||
#else
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
#endif;
|
||||
#endif
|
||||
|
||||
while (SDL_AtomicGet(&me->m_Stopping) == 0) {
|
||||
me->m_Pacer->vsyncCallback(1000 / me->m_DisplayFps);
|
||||
|
|
Loading…
Reference in a new issue