From 61761b65f2ae033fbdf5b4aa734036f66c116f18 Mon Sep 17 00:00:00 2001 From: nmzik Date: Mon, 21 Sep 2026 09:13:19 +0400 Subject: [PATCH] Honor PS5 title output-resolution detection permission --- src/graphics/presentation/videoOut.cpp | 7 ++++++- src/loader/systemContent.cpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/graphics/presentation/videoOut.cpp b/src/graphics/presentation/videoOut.cpp index 8847b9bce..d67d60896 100644 --- a/src/graphics/presentation/videoOut.cpp +++ b/src/graphics/presentation/videoOut.cpp @@ -20,6 +20,7 @@ #include "kernel/pthread.h" #include "libs/errno.h" #include "libs/libs.h" +#include "loader/systemContent.h" #include #include @@ -1654,8 +1655,12 @@ KYTY_SYSV_ABI int VideoOutGetOutputStatus(int handle, VideoOutOutputStatus* stat return VIDEO_OUT_ERROR_INVALID_HANDLE; } + int32_t attribute3 = 0; + Loader::SystemContentParamSfoGetInt("ATTRIBUTE3", &attribute3); ctx->mutex.Lock(); - status->resolution = (ctx->width >= 3840 || ctx->height >= 2160 ? 2u : 1u); + // Primary output reports 4K unless param.json Video-out Info enables resolution detection. + status->resolution = + ((attribute3 & 4) != 0 && ctx->width < 3840 && ctx->height < 2160 ? 1u : 2u); status->dynamicRange = 1; status->refreshRate = (ctx->output_mode == VIDEO_OUT_OUTPUT_MODE_119_88HZ || Config::GetVblankFrequency() >= 119 diff --git a/src/loader/systemContent.cpp b/src/loader/systemContent.cpp index f4a4c27fc..b86fcff76 100644 --- a/src/loader/systemContent.cpp +++ b/src/loader/systemContent.cpp @@ -164,6 +164,7 @@ void Psf::OpenJson(const std::filesystem::path& file_name) { add_string_param("contentId", "CONTENT_ID"); add_string_param("contentVersion", "APP_VER"); add_string_param("appVersion", "APP_VER"); + add_int_param("attribute3", "ATTRIBUTE3"); add_int_param("userDefinedParam1", "USER_DEFINED_PARAM_1"); add_int_param("userDefinedParam2", "USER_DEFINED_PARAM_2"); add_int_param("userDefinedParam3", "USER_DEFINED_PARAM_3");