mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-14 14:43:15 +00:00
Fork detection fixes IIIIX (#2966)
Some checks are pending
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / reuse (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / reuse (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* Fix local builds * Add remote fork windows title to release builds too * Remove trailing slah from remote links before processing
This commit is contained in:
parent
eb21083078
commit
786ad6f71e
3 changed files with 37 additions and 21 deletions
|
@ -134,6 +134,7 @@ if (GIT_REMOTE_RESULT OR GIT_REMOTE_NAME STREQUAL "")
|
||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
message("got remote: ${GIT_REMOTE_NAME}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If running in GitHub Actions and the above fails
|
# If running in GitHub Actions and the above fails
|
||||||
|
@ -177,7 +178,7 @@ if (GIT_REMOTE_RESULT OR GIT_REMOTE_NAME STREQUAL "")
|
||||||
set(GIT_BRANCH "${GITHUB_BRANCH}")
|
set(GIT_BRANCH "${GITHUB_BRANCH}")
|
||||||
elseif ("${PR_NUMBER}" STREQUAL "" AND NOT "${GITHUB_REF}" STREQUAL "")
|
elseif ("${PR_NUMBER}" STREQUAL "" AND NOT "${GITHUB_REF}" STREQUAL "")
|
||||||
set(GIT_BRANCH "${GITHUB_REF}")
|
set(GIT_BRANCH "${GITHUB_REF}")
|
||||||
else()
|
elseif("${GIT_BRANCH}" STREQUAL "")
|
||||||
message("couldn't find branch")
|
message("couldn't find branch")
|
||||||
set(GIT_BRANCH "detached-head")
|
set(GIT_BRANCH "detached-head")
|
||||||
endif()
|
endif()
|
||||||
|
@ -186,8 +187,8 @@ else()
|
||||||
string(FIND "${GIT_REMOTE_NAME}" "/" INDEX)
|
string(FIND "${GIT_REMOTE_NAME}" "/" INDEX)
|
||||||
if (INDEX GREATER -1)
|
if (INDEX GREATER -1)
|
||||||
string(SUBSTRING "${GIT_REMOTE_NAME}" 0 "${INDEX}" GIT_REMOTE_NAME)
|
string(SUBSTRING "${GIT_REMOTE_NAME}" 0 "${INDEX}" GIT_REMOTE_NAME)
|
||||||
else()
|
elseif("${GIT_REMOTE_NAME}" STREQUAL "")
|
||||||
# If no remote is present (only a branch name), default to origin
|
message("reset to origin")
|
||||||
set(GIT_REMOTE_NAME "origin")
|
set(GIT_REMOTE_NAME "origin")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -190,16 +190,24 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector<std::str
|
||||||
|
|
||||||
std::string game_title = fmt::format("{} - {} <{}>", id, title, app_version);
|
std::string game_title = fmt::format("{} - {} <{}>", id, title, app_version);
|
||||||
std::string window_title = "";
|
std::string window_title = "";
|
||||||
if (Common::g_is_release) {
|
std::string remote_url(Common::g_scm_remote_url);
|
||||||
window_title = fmt::format("shadPS4 v{} | {}", Common::g_version, game_title);
|
std::string remote_host;
|
||||||
} else {
|
try {
|
||||||
std::string remote_url(Common::g_scm_remote_url);
|
if (*remote_url.rbegin() == '/') {
|
||||||
std::string remote_host;
|
remote_url.pop_back();
|
||||||
try {
|
|
||||||
remote_host = remote_url.substr(19, remote_url.rfind('/') - 19);
|
|
||||||
} catch (...) {
|
|
||||||
remote_host = "unknown";
|
|
||||||
}
|
}
|
||||||
|
remote_host = remote_url.substr(19, remote_url.rfind('/') - 19);
|
||||||
|
} catch (...) {
|
||||||
|
remote_host = "unknown";
|
||||||
|
}
|
||||||
|
if (Common::g_is_release) {
|
||||||
|
if (remote_host == "shadps4-emu" || remote_url.length() == 0) {
|
||||||
|
window_title = fmt::format("shadPS4 v{} | {}", Common::g_version, game_title);
|
||||||
|
} else {
|
||||||
|
window_title =
|
||||||
|
fmt::format("shadPS4 {}/v{} | {}", remote_host, Common::g_version, game_title);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (remote_host == "shadps4-emu" || remote_url.length() == 0) {
|
if (remote_host == "shadps4-emu" || remote_url.length() == 0) {
|
||||||
window_title = fmt::format("shadPS4 v{} {} {} | {}", Common::g_version,
|
window_title = fmt::format("shadPS4 v{} {} {} | {}", Common::g_version,
|
||||||
Common::g_scm_branch, Common::g_scm_desc, game_title);
|
Common::g_scm_branch, Common::g_scm_desc, game_title);
|
||||||
|
|
|
@ -55,16 +55,23 @@ bool MainWindow::Init() {
|
||||||
// show ui
|
// show ui
|
||||||
setMinimumSize(720, 405);
|
setMinimumSize(720, 405);
|
||||||
std::string window_title = "";
|
std::string window_title = "";
|
||||||
if (Common::g_is_release) {
|
std::string remote_url(Common::g_scm_remote_url);
|
||||||
window_title = fmt::format("shadPS4 v{}", Common::g_version);
|
std::string remote_host;
|
||||||
} else {
|
try {
|
||||||
std::string remote_url(Common::g_scm_remote_url);
|
if (*remote_url.rbegin() == '/') {
|
||||||
std::string remote_host;
|
remote_url.pop_back();
|
||||||
try {
|
|
||||||
remote_host = remote_url.substr(19, remote_url.rfind('/') - 19);
|
|
||||||
} catch (...) {
|
|
||||||
remote_host = "unknown";
|
|
||||||
}
|
}
|
||||||
|
remote_host = remote_url.substr(19, remote_url.rfind('/') - 19);
|
||||||
|
} catch (...) {
|
||||||
|
remote_host = "unknown";
|
||||||
|
}
|
||||||
|
if (Common::g_is_release) {
|
||||||
|
if (remote_host == "shadps4-emu" || remote_url.length() == 0) {
|
||||||
|
window_title = fmt::format("shadPS4 v{}", Common::g_version);
|
||||||
|
} else {
|
||||||
|
window_title = fmt::format("shadPS4 {}/v{}", remote_host, Common::g_version);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (remote_host == "shadps4-emu" || remote_url.length() == 0) {
|
if (remote_host == "shadps4-emu" || remote_url.length() == 0) {
|
||||||
window_title = fmt::format("shadPS4 v{} {} {}", Common::g_version, Common::g_scm_branch,
|
window_title = fmt::format("shadPS4 v{} {} {}", Common::g_version, Common::g_scm_branch,
|
||||||
Common::g_scm_desc);
|
Common::g_scm_desc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue