From c9ce8863a85b617541ba5d216ce35190fa3a784c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 16 May 2025 10:53:19 +0200 Subject: [PATCH] main screen: Only have click-to-copy on the version name if it's not a basic version --- UI/MainScreen.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index fa8c93cc3f..468ec46614 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -1280,12 +1280,16 @@ void MainScreen::CreateViews() { ClickableTextView *ver = rightColumnItems->Add(new ClickableTextView(versionString, new LinearLayoutParams(Margins(70, -10, 0, 4)))); ver->SetSmall(true); ver->SetClip(false); - ver->OnClick.Add([](UI::EventParams &e) { - auto di = GetI18NCategory(I18NCat::DIALOG); - System_CopyStringToClipboard(PPSSPP_GIT_VERSION); - g_OSD.Show(OSDType::MESSAGE_INFO, ApplySafeSubstitutions(di->T("Copied to clipboard: %1"), PPSSPP_GIT_VERSION)); - return UI::EVENT_DONE; - }); + + // Only allow copying the version if it looks like a git version string. 1.19 for example is not really necessary to be able to copy/paste. + if (strchr(PPSSPP_GIT_VERSION, '-')) { + ver->OnClick.Add([](UI::EventParams &e) { + auto di = GetI18NCategory(I18NCat::DIALOG); + System_CopyStringToClipboard(PPSSPP_GIT_VERSION); + g_OSD.Show(OSDType::MESSAGE_INFO, ApplySafeSubstitutions(di->T("Copied to clipboard: %1"), PPSSPP_GIT_VERSION)); + return UI::EVENT_DONE; + }); + } LinearLayout *rightColumnChoices = rightColumnItems; if (vertical) {