Play your Steam library's Windows games on a jailbroken PS5.
C++
Say how a game gets 120 Hz output on an older runtime
Leonardo Lobato3ef41a4ef017
diff --git a/src/runtime/game_settings.cpp b/src/runtime/game_settings.cppindex 9d5388b..eb018f9 100644--- a/src/runtime/game_settings.cpp+++ b/src/runtime/game_settings.cpp@@ -376,7 +376,7 @@ std::string Unavailable(const SettingDefinition& definition, const std::string&} else if (id == "frame_limit" || id == "vsync" || id == "frame_latency" || id == "reported_vram" ||id == "reported_gpu") {if (id == "frame_limit" && !dxvk && graphics == "opengl" && kit.display_120hz_needs_update)- return "Update this game to use it.";+ return "Play this game once to update its runtime first.";if (!dxvk) return "Only available with DXVK.";if (!kit.dxvk_config) return "Needs a runtime that reads dxvk.conf.";// Checked on the console (results/20261005-dxvk-conf-probe): the cap works, DXVK applies@@ -423,7 +423,7 @@ std::string Unavailable(const SettingDefinition& definition, const std::string&}if (id == "refresh") {if (!display_graphics) return "Only with DXVK or OpenGL.";- if (kit.display_120hz_needs_update) return "Update this game to use it.";+ if (kit.display_120hz_needs_update) return "Play this game once to update its runtime first.";if (!kit.display_120hz) return "Needs a runtime kit with 120 Hz output.";}if (id == "pointer_speed") {@@ -480,7 +480,7 @@ std::string SettingChoiceUnavailable(const EffectiveSettings& settings, std::strif (!settings.display_120hz) {// Without a runtime that paces it, the cap is DXVK's maxFrameRate: 30 and 60 as before.if (!high) return {};- return settings.display_120hz_needs_update ? "Update this game to use it." : "Needs a runtime kit with 120 Hz output.";+ return settings.display_120hz_needs_update ? "Play this game once to update its runtime first." : "Needs a runtime kit with 120 Hz output.";}const auto refresh = settings.values.find("refresh");const bool at_120 = refresh != settings.values.end() && refresh->second.available && refresh->second.value == "120";diff --git a/tests/game_settings_test.cpp b/tests/game_settings_test.cppindex deb0729..ac64724 100644--- a/tests/game_settings_test.cpp+++ b/tests/game_settings_test.cpp@@ -394,17 +394,17 @@ int main(int argc, char** argv) {CHECK(KitForTitleRuntime(display, true).display_120hz);CHECK(!KitForTitleRuntime(KitCapabilities{}, false).display_120hz_needs_update);CHECK(BuildEffectiveSettings(hl2, nullptr, {{"refresh", "120"}, {"frame_limit", "60"}}, stale, &shown, &error));- CHECK(!shown.values.at("refresh").available && shown.values.at("refresh").reason == "Update this game to use it.");+ CHECK(!shown.values.at("refresh").available && shown.values.at("refresh").reason == "Play this game once to update its runtime first.");CHECK(shown.values.at("frame_limit").available && Value(shown, "frame_limit") == "60");CHECK(RenderProsperoProfile(hl2, shown, target, &profile, &reason));CHECK(profile.text.find("frame_rate") == std::string::npos && profile.text.find("refresh") == std::string::npos);CHECK(CheckProsperoProfile(profile.text, &reason)); // the old key setCHECK(RenderDxvkConfig(shown).find("\ndxgi.maxFrameRate = 60\nd3d9.maxFrameRate = 60\n") != std::string::npos);CHECK(BuildEffectiveSettings(hl2, nullptr, {{"frame_limit", "40"}}, stale, &shown, &error));- CHECK(Value(shown, "frame_limit") == "off" && shown.values.at("frame_limit").reason == "Update this game to use it.");+ CHECK(Value(shown, "frame_limit") == "off" && shown.values.at("frame_limit").reason == "Play this game once to update its runtime first.");CHECK(RenderDxvkConfig(shown).find("maxFrameRate") == std::string::npos);CHECK(BuildEffectiveSettings(opengl, nullptr, {{"refresh", "120"}, {"frame_limit", "60"}}, stale, &shown, &error));- CHECK(!shown.values.at("frame_limit").available && shown.values.at("frame_limit").reason == "Update this game to use it.");+ CHECK(!shown.values.at("frame_limit").available && shown.values.at("frame_limit").reason == "Play this game once to update its runtime first.");CHECK(RenderProsperoProfile(opengl, shown, target, &profile, &reason));CHECK(profile.text.find("frame_rate") == std::string::npos && profile.text.find("\nrefresh = 60\n") != std::string::npos);CHECK(BuildEffectiveSettings(d3d12, nullptr, {{"refresh", "120"}, {"frame_limit", "30"}}, stale, &shown, &error));diff --git a/tests/homebrew_live_model_test.cpp b/tests/homebrew_live_model_test.cppindex 9b5a12f..7a9047d 100644--- a/tests/homebrew_live_model_test.cpp+++ b/tests/homebrew_live_model_test.cpp@@ -248,11 +248,11 @@ void live_120hz_waits_for_the_title_update(const std::filesystem::path& base) {activate(model, "game-settings");activate(model, "section-more");const auto* refresh = find_row(model, "setting-refresh");- check(refresh && !refresh->enabled && refresh->subtitle == "Update this game to use it.",+ check(refresh && !refresh->enabled && refresh->subtitle == "Play this game once to update its runtime first.","120 Hz output waits for the title's Update");activate(model, "setting-frame_limit");const auto* limit_120 = find_row(model, "choice-1");- check(limit_120 && limit_120->title == "120" && !limit_120->enabled && limit_120->subtitle == "Update this game to use it.",+ check(limit_120 && limit_120->title == "120" && !limit_120->enabled && limit_120->subtitle == "Play this game once to update its runtime first.","Frame limit 120 waits for the title's Update");check(find_row(model, "choice-2") && find_row(model, "choice-2")->enabled, "Frame limit 60 stays available");check(model.action("circle"), "close the Frame limit picker");