Play your Steam library's Windows games on a jailbroken PS5.
C++
Show every About value in full
Leonardo Lobato5f69984de28b
diff --git a/src/homebrew/simulation.cpp b/src/homebrew/simulation.cppindex 888d0d5..28faee6 100644--- a/src/homebrew/simulation.cpp+++ b/src/homebrew/simulation.cpp@@ -107,10 +107,10 @@ std::string version_label(const std::string& version) {return version + (version.find("-beta.") != std::string::npos ? " (Beta)" : "");}-// "Nightly 20261027.2 · d94c0b384d" for a nightly, the commit for any other build.+// "20261027.2 · d94c0b384d" for a nightly (Version already says Nightly), the commit for any other build.std::string build_label(const std::string& version, const std::string& commit) {const auto nightly = version.find("-nightly.");- std::string label = nightly == std::string::npos ? std::string() : "Nightly " + version.substr(nightly + 9);+ std::string label = nightly == std::string::npos ? std::string() : version.substr(nightly + 9);if (!commit.empty()) label += (label.empty() ? "" : " · ") + commit;return label.empty() ? "Unknown" : label;}@@ -515,8 +515,8 @@ std::string action_label(const std::string& key) {{"self-update-restart", "Restart Playden"}, {"self-update-cancel", "Cancel update"},{"kit-install", "Download"}, {"kit-cancel", "Cancel download"},{"self-update-back-confirm", "Go back"}, {"release-notes-ok", "OK"},- {"about-build", "Build"}, {"about-framework", "Framework"}, {"about-platform", "Platform"},- {"about-kit", "Runtime kit"}, {"about-kit-source", "Built from"},+ {"about-build", "Build"},+ {"about-kit", "Runtime kit"}, {"about-kit-source", "Kit built from"},{"about-back", "Back"}, {"inject-library-refresh", "Refresh library fixture"},{"inject-startup-loading", "Show startup loading"}};if (const auto found = labels.find(key); found != labels.end()) return found->second;@@ -4695,13 +4695,11 @@ void Simulation::rebuild_view() {else if (action_key.rfind("open-game:", 0) == 0) item.title = "Open game";else if (action_key == "about-version") { item.kind = RowKind::Status; item.value = live() ? "Playden " + version_label(state_.self_update.current) : "Simulated"; item.enabled = false; }else if (action_key == "about-build") { item.kind = RowKind::Status; item.value = live() ? build_label(state_.self_update.current, state_.self_update.commit) : "UI comparison fixture"; item.enabled = false; }- else if (action_key == "about-framework") { item.kind = RowKind::Status; item.value = "Homebrew native model + Hui"; item.enabled = false; }- else if (action_key == "about-platform") { item.kind = RowKind::Status; item.value = "Host / PS5 homebrew"; item.enabled = false; }else if (action_key == "about-kit" || action_key == "about-kit-source") {// The kit in use, and the one this build was tested with when they differ.LiveKitInfo kit = state_.kit;if (!live()) kit = {"playden-kit", std::string(64, 'b'), std::string(64, 'b'), std::string(40, '2'), false, {}};- const auto short_hash = [](const std::string& hash) { return hash.substr(0, 12); };+ const auto short_hash = [](const std::string& hash) { return hash.substr(0, 10); };item.kind = RowKind::Status; item.enabled = false;if (kit.kit_id.empty()) {item.value = action_key == "about-kit" ? "None" : "—";@@ -7934,10 +7932,10 @@ void Simulation::activate() {state_.navigation.focus_key = "settings-about";settings_focus_section_ = "About";open_modal({"about", live() ? "About Playden" : "About Playden UI simulation", "settings-about",- {"about-version", "about-build", "about-framework", "about-platform", "about-kit", "about-kit-source", "about-back"}, 4, false});+ {"about-version", "about-build", "about-kit", "about-kit-source", "about-back"}, 2, false});}else if (action_name == "about") open_modal({"about", live() ? "About Playden" : "About Playden UI simulation", state_.navigation.focus_key,- {"about-version", "about-build", "about-framework", "about-platform", "about-kit", "about-kit-source", "about-back"}, 0, false});+ {"about-version", "about-build", "about-kit", "about-kit-source", "about-back"}, 0, false});else if (action_name == "about-back") close_modal();else if (live() && action_name == "toggle-beta-updates") {state_.beta_updates = !state_.beta_updates;diff --git a/src/homebrew/view.cpp b/src/homebrew/view.cppindex 064e921..1f6e47b 100644--- a/src/homebrew/view.cpp+++ b/src/homebrew/view.cpp@@ -3975,6 +3975,17 @@ class Render::Impl// The Import sheets: each folder's path (or why it can't be added) under its name.const bool import_sheet = view.surface == "import-games" || view.surface == "import-programs" ||view.surface == "import-choice" || view.surface == "steam-programs";+ // About: each fact as its name over its value and note, at the row's full width, wrapped and never cut.+ const bool about_sheet = view.surface == "about";+ const auto about_lines = [&](const std::string &text, float size) {+ return text.empty() ? 0.0F+ : static_cast<float>(fonts_.regular.font->wrap(text, size, bounds.w - 48.0F).size());+ };+ const auto about_height = [&](const ViewRow &row) {+ // Room for one note line on every fact, so rows with and without one line up.+ return 58.0F + 30.0F * std::max(1.0F, about_lines(overlay_value(row), 24.0F)) ++ 26.0F * std::max(1.0F, about_lines(row.subtitle, 19.0F));+ };// The import wizard's hints wrap onto a second line rather than being cut.const float hint_width = bounds.w - 48.0F;const auto hint_extra = [&](const ViewRow &row) {@@ -3986,6 +3997,8 @@ class Render::Impl// Every row's place in the list; the list scrolls only when it is taller than the sheet,// just enough to keep the focused row and a little of its neighbours in view, and eases there.const auto pitch = [&](const ViewRow &row) {+ if (about_sheet && row.kind == RowKind::Status)+ return about_height(row) + 12.0F;if (settings_sheet && row.kind == RowKind::Heading)return 54.0F + 12.0F;if (row.kind == RowKind::Heading || row.kind == RowKind::Separator)@@ -4053,6 +4066,25 @@ class Render::Imply += rect.h + 12.0F;continue;}+ if (about_sheet && row.kind == RowKind::Status)+ {+ const gfx::Rect rect{bounds.x, y, bounds.w, about_height(row)};+ const float amount = control_focus("sheet-" + row.key, index == view.focused_row);+ focus_glow(overlay_, rect, amount);+ overlay_.rounded_rect(rect, 8.0F, kPanel);+ overlay_.rounded_rect(rect, 8.0F, kText.with_alpha(0.04F));+ const float width = rect.w - 48.0F;+ ui::text(overlay_, fonts_.semibold, fit(fonts_.semibold, overlay_label(row), 19.0F, width),+ rect.x + 24.0F, rect.y + 36.0F, 19.0F, kSecondary);+ // The facts are disabled rows, but they are what this sheet is for: full ink.+ const float note_y = ui::paragraph(overlay_, fonts_.regular, overlay_value(row), rect.x + 24.0F,+ rect.y + 70.0F, 24.0F, width, 30.0F, kText);+ if (!row.subtitle.empty())+ ui::paragraph(overlay_, fonts_.regular, row.subtitle, rect.x + 24.0F, note_y + 2.0F, 19.0F, width,+ 26.0F, row.tone == "problem" ? kRed : kSecondary);+ focus_ring(overlay_, rect, amount);+ continue;+ }if (row.kind == RowKind::Heading || row.kind == RowKind::Separator){ui::text(overlay_, fonts_.display, ui::upper(row.title), bounds.x + 12.0F, y + 28.0F,diff --git a/tests/homebrew_library_graphical_test.cpp b/tests/homebrew_library_graphical_test.cppindex d0f3da1..4184031 100644--- a/tests/homebrew_library_graphical_test.cpp+++ b/tests/homebrew_library_graphical_test.cpp@@ -158,6 +158,16 @@ int main(int argc,char** argv) {for(int i=0;i<4 && updating.state().navigation.route!=Route::Settings;++i) assert(updating.action("r1"));assert(updating.action("focus:settings-release-notes") && updating.action("cross"));capture_update("release-notes-short.png");+ // About: every fact in full, the kit's notes under its rows.+ while(!updating.state().navigation.modals.empty()) assert(updating.action("circle"));+ fresh.current="0.8.0-nightly.20261027.2"; fresh.commit="e7a30f21e8";+ updating.UpdateSelfUpdate(fresh);+ updating.SetKitInfo({"playden-kit",std::string(64,'d'),std::string(64,'e'),std::string(40,'f'),true,{}});+ assert(updating.action("focus:settings-about") && updating.action("cross"));+ assert(updating.view().surface=="about" && updating.view().rows.size()==5);+ assert(updating.action("down") && updating.action("down") && updating.action("down"));+ assert(updating.view().rows[static_cast<std::size_t>(updating.view().focused_row)].key=="about-kit-source");+ capture_update("about.png");}{// Steam's options name no clear program: setting up asks which one starts the game.diff --git a/tests/homebrew_live_model_test.cpp b/tests/homebrew_live_model_test.cppindex 3d896ad..636859d 100644--- a/tests/homebrew_live_model_test.cpp+++ b/tests/homebrew_live_model_test.cpp@@ -834,7 +834,7 @@ void live_self_update(const std::filesystem::path& base) {activate(model, "settings-about");check(find_row(model, "about-version") && find_row(model, "about-version")->value == "Playden 0.8.0 (Nightly)","about: a nightly's version");- check(find_row(model, "about-build") && find_row(model, "about-build")->value == "Nightly 20261027.2 · d94c0b384d",+ check(find_row(model, "about-build") && find_row(model, "about-build")->value == "20261027.2 · d94c0b384d","about: a nightly's build and commit");update.current = "0.7.1-beta.1";model.UpdateSelfUpdate(update);diff --git a/tests/homebrew_simulation_test.cpp b/tests/homebrew_simulation_test.cppindex 43beb1b..ed57612 100644--- a/tests/homebrew_simulation_test.cpp+++ b/tests/homebrew_simulation_test.cpp@@ -693,8 +693,8 @@ void t11_preferences_failure_and_controller_modal_recovery(const std::filesystem&& switched_restart.state().library.favorites.contains(SteamId(900010)),"T11 switched account identity and organization restore only from its profile");restored.action("route:settings"); activate(restored, "settings-about");- check(restored.view().surface == "about" && restored.view().rows.size() == 7,- "T11 About exposes version, build, framework, platform, kit, kit source, and Back rows");+ check(restored.view().surface == "about" && restored.view().rows.size() == 5,+ "T11 About exposes version, build, kit, kit source, and Back rows");{const auto& rows = restored.view().rows;const auto kit = std::find_if(rows.begin(), rows.end(), [](const auto& row) { return row.key == "about-kit"; });