mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-19 06:39:55 +00:00
Disable the window mode options for always full-screen renderers
This commit is contained in:
@@ -45,6 +45,11 @@ bool FFmpegVideoDecoder::isHardwareAccelerated()
|
||||
(m_VideoDecoderCtx->codec->capabilities & AV_CODEC_CAP_HARDWARE) != 0;
|
||||
}
|
||||
|
||||
bool FFmpegVideoDecoder::isAlwaysFullScreen()
|
||||
{
|
||||
return m_BackendRenderer->getRendererAttributes() & RENDERER_ATTRIBUTE_FULLSCREEN_ONLY;
|
||||
}
|
||||
|
||||
int FFmpegVideoDecoder::getDecoderCapabilities()
|
||||
{
|
||||
int capabilities = m_BackendRenderer->getDecoderCapabilities();
|
||||
@@ -187,23 +192,6 @@ bool FFmpegVideoDecoder::createFrontendRenderer(PDECODER_PARAMETERS params)
|
||||
}
|
||||
}
|
||||
|
||||
// Determine whether the frontend renderer prefers frame pacing
|
||||
auto vsyncConstraint = m_FrontendRenderer->getFramePacingConstraint();
|
||||
if (vsyncConstraint == IFFmpegRenderer::PACING_FORCE_OFF && params->enableFramePacing) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Frame pacing is forcefully disabled by the frontend renderer");
|
||||
params->enableFramePacing = false;
|
||||
}
|
||||
else if (vsyncConstraint == IFFmpegRenderer::PACING_FORCE_ON && !params->enableFramePacing) {
|
||||
// FIXME: This duplicates logic in Session.cpp
|
||||
int displayHz = StreamUtils::getDisplayRefreshRate(params->window);
|
||||
if (displayHz + 5 >= params->frameRate) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Frame pacing is forcefully enabled by the frontend renderer");
|
||||
params->enableFramePacing = true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user