Merge branch 'main' into http-part2

This commit is contained in:
georgemoralis 2025-05-22 09:04:10 +03:00 committed by GitHub
commit 45ff27fc33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 84 additions and 60 deletions

View file

@ -134,6 +134,7 @@ if (GIT_REMOTE_RESULT OR GIT_REMOTE_NAME STREQUAL "")
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message("got remote: ${GIT_REMOTE_NAME}")
endif()
# 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}")
elseif ("${PR_NUMBER}" STREQUAL "" AND NOT "${GITHUB_REF}" STREQUAL "")
set(GIT_BRANCH "${GITHUB_REF}")
else()
elseif("${GIT_BRANCH}" STREQUAL "")
message("couldn't find branch")
set(GIT_BRANCH "detached-head")
endif()
@ -186,8 +187,8 @@ else()
string(FIND "${GIT_REMOTE_NAME}" "/" INDEX)
if (INDEX GREATER -1)
string(SUBSTRING "${GIT_REMOTE_NAME}" 0 "${INDEX}" GIT_REMOTE_NAME)
else()
# If no remote is present (only a branch name), default to origin
elseif("${GIT_REMOTE_NAME}" STREQUAL "")
message("reset to origin")
set(GIT_REMOTE_NAME "origin")
endif()
endif()

View file

@ -53,7 +53,7 @@ template <class ReturnType, class... FuncArgs, class... CallArgs>
ReturnType ExecuteGuest(PS4_SYSV_ABI ReturnType (*func)(FuncArgs...), CallArgs&&... args) {
EnsureThreadInitialized();
// clear stack to avoid trash from EnsureThreadInitialized
ClearStack<13_KB>();
ClearStack<12_KB>();
return func(std::forward<CallArgs>(args)...);
}

View file

@ -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 window_title = "";
if (Common::g_is_release) {
window_title = fmt::format("shadPS4 v{} | {}", Common::g_version, game_title);
} else {
std::string remote_url(Common::g_scm_remote_url);
std::string remote_host;
try {
remote_host = remote_url.substr(19, remote_url.rfind('/') - 19);
} catch (...) {
remote_host = "unknown";
std::string remote_url(Common::g_scm_remote_url);
std::string remote_host;
try {
if (*remote_url.rbegin() == '/') {
remote_url.pop_back();
}
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) {
window_title = fmt::format("shadPS4 v{} {} {} | {}", Common::g_version,
Common::g_scm_branch, Common::g_scm_desc, game_title);

View file

@ -79,6 +79,11 @@ public:
if (const auto play_time = psf.GetString("PLAY_TIME"); play_time.has_value()) {
game.play_time = *play_time;
}
if (const auto save_dir = psf.GetString("INSTALL_DIR_SAVEDATA"); save_dir.has_value()) {
game.save_dir = *save_dir;
} else {
game.save_dir = game.serial;
}
}
return game;
}

View file

@ -25,6 +25,7 @@ struct GameInfo {
std::string version = "Unknown";
std::string region = "Unknown";
std::string fw = "Unknown";
std::string save_dir = "Unknown";
std::string play_time = "Unknown";
CompatibilityEntry compatibility = CompatibilityEntry{CompatibilityStatus::Unknown};

View file

@ -160,7 +160,7 @@ public:
Common::FS::PathToQString(userPath,
Common::FS::GetUserPath(Common::FS::PathType::UserDir));
QString saveDataPath =
userPath + "/savedata/1/" + QString::fromStdString(m_games[itemID].serial);
userPath + "/savedata/1/" + QString::fromStdString(m_games[itemID].save_dir);
QDir(saveDataPath).mkpath(saveDataPath);
QDesktopServices::openUrl(QUrl::fromLocalFile(saveDataPath));
}

View file

@ -55,16 +55,23 @@ bool MainWindow::Init() {
// show ui
setMinimumSize(720, 405);
std::string window_title = "";
if (Common::g_is_release) {
window_title = fmt::format("shadPS4 v{}", Common::g_version);
} else {
std::string remote_url(Common::g_scm_remote_url);
std::string remote_host;
try {
remote_host = remote_url.substr(19, remote_url.rfind('/') - 19);
} catch (...) {
remote_host = "unknown";
std::string remote_url(Common::g_scm_remote_url);
std::string remote_host;
try {
if (*remote_url.rbegin() == '/') {
remote_url.pop_back();
}
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) {
window_title = fmt::format("shadPS4 v{} {} {}", Common::g_version, Common::g_scm_branch,
Common::g_scm_desc);

View file

@ -2048,7 +2048,7 @@
</message>
<message>
<source> * Unsupported Vulkan Version</source>
<translation type="unfinished"> * Unsupported Vulkan Version</translation>
<translation> * Version de Vulkan non prise en charge</translation>
</message>
</context>
<context>

View file

@ -1253,11 +1253,11 @@
</message>
<message>
<source>List View</source>
<translation>Liste-visning</translation>
<translation>Listevisning</translation>
</message>
<message>
<source>Grid View</source>
<translation>Rute-visning</translation>
<translation>Rutenettvisning</translation>
</message>
<message>
<source>Elf Viewer</source>
@ -1756,7 +1756,7 @@
</message>
<message>
<source>Log Filter:\nFilters the log to only print specific information.\nExamples: &quot;Core:Trace&quot; &quot;Lib.Pad:Debug Common.Filesystem:Error&quot; &quot;*:Critical&quot;\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it.</source>
<translation>Loggfilter:\nFiltrerer loggen for å kun skrive ut spesifikk informasjon.\nEksempler: &quot;Core:Trace&quot; &quot;Lib.Pad:Debug Common.Filesystem:Error&quot; &quot;*:Critical&quot; \nNivåer: Trace, Debug, Info, Warning, Error, Critical - i denne rekkefølgen, et spesifikt nivå demper alle tidligere nivåer i lista og loggfører alle nivåer etter det.</translation>
<translation>Loggfilter:\nFiltrerer loggen for å kun skrive ut spesifikk informasjon.\nEksempler: «Core:Trace» «Lib.Pad:Debug Common.Filesystem:Error» «*:Critical» \nNivåer: Trace, Debug, Info, Warning, Error, Critical - i denne rekkefølgen, et spesifikt nivå demper alle tidligere nivåer i lista og loggfører alle nivåer etter det.</translation>
</message>
<message>
<source>Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable.</source>
@ -1788,7 +1788,7 @@
</message>
<message>
<source>Display Compatibility Data:\nDisplays game compatibility information in table view. Enable &quot;Update Compatibility On Startup&quot; to get up-to-date information.</source>
<translation>Vis kompatibilitets-data:\nViser informasjon om spillkompatibilitet i tabellvisning. Bruk &quot;Oppdater kompatibilitets-data ved oppstart&quot; for oppdatert informasjon.</translation>
<translation>Vis kompatibilitets-data:\nViser informasjon om spillkompatibilitet i tabellvisning. Bruk «Oppdater database ved oppstart» for oppdatert informasjon.</translation>
</message>
<message>
<source>Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts.</source>
@ -1828,7 +1828,7 @@
</message>
<message>
<source>Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select &quot;Auto Select&quot; to automatically determine it.</source>
<translation>Grafikkenhet:\nSystemer med flere GPU-er, kan emulatoren velge hvilken enhet som skal brukes fra rullegardinlista,\neller velg &quot;Velg automatisk&quot;.</translation>
<translation>Grafikkenhet:\nSystemer med flere GPU-er, kan emulatoren velge hvilken enhet som skal brukes fra rullegardinlista,\neller bruk «Velg automatisk».</translation>
</message>
<message>
<source>Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution.</source>
@ -2048,7 +2048,7 @@
</message>
<message>
<source> * Unsupported Vulkan Version</source>
<translation type="unfinished"> * Unsupported Vulkan Version</translation>
<translation> *Ustøttet Vulkan-versjon</translation>
</message>
</context>
<context>

View file

@ -543,7 +543,7 @@
</message>
<message>
<source>Unable to Save</source>
<translation>Não é possível salvar</translation>
<translation>Não foi possível guardar</translation>
</message>
<message>
<source>Cannot bind axis values more than once</source>
@ -551,7 +551,7 @@
</message>
<message>
<source>Save</source>
<translation>Salvar</translation>
<translation>Guardar</translation>
</message>
<message>
<source>Apply</source>
@ -559,7 +559,7 @@
</message>
<message>
<source>Restore Defaults</source>
<translation>Restaurar o Padrão</translation>
<translation>Restaurar Predefinições</translation>
</message>
<message>
<source>Cancel</source>
@ -570,11 +570,11 @@
<name>EditorDialog</name>
<message>
<source>Edit Keyboard + Mouse and Controller input bindings</source>
<translation>Editar comandos do Teclado + Mouse e do Controle</translation>
<translation>Editar configurações de entrada do Teclado + Rato e do Comando</translation>
</message>
<message>
<source>Use Per-Game configs</source>
<translation>Use uma configuração para cada jogo</translation>
<translation>Utilizar configurações por jogo</translation>
</message>
<message>
<source>Error</source>
@ -582,19 +582,19 @@
</message>
<message>
<source>Could not open the file for reading</source>
<translation>Não foi possível abrir o arquivo para ler</translation>
<translation>Não foi possível abrir o ficheiro para leitura</translation>
</message>
<message>
<source>Could not open the file for writing</source>
<translation>Não foi possível abrir o arquivo para escrever</translation>
<translation>Não foi possível abrir o ficheiro para escrita</translation>
</message>
<message>
<source>Save Changes</source>
<translation>Salvar mudanças</translation>
<translation>Guardar as alterações</translation>
</message>
<message>
<source>Do you want to save changes?</source>
<translation>Salvar as mudanças?</translation>
<translation>Pretende guardar as alterações?</translation>
</message>
<message>
<source>Help</source>
@ -610,7 +610,7 @@
</message>
<message>
<source>Reset to Default</source>
<translation>Resetar ao Padrão</translation>
<translation>Repor para o Padrão</translation>
</message>
</context>
<context>
@ -1150,7 +1150,7 @@
</message>
<message>
<source>Unable to Save</source>
<translation>Não é possível salvar</translation>
<translation>Não foi possível guardar</translation>
</message>
<message>
<source>Cannot bind any unique input more than once</source>
@ -1166,11 +1166,11 @@
</message>
<message>
<source>Mousewheel cannot be mapped to stick outputs</source>
<translation>Roda do rato não pode ser mapeada para saídas empates</translation>
<translation>Roda do rato não pode ser mapeada para saídas dos manípulos</translation>
</message>
<message>
<source>Save</source>
<translation>Salvar</translation>
<translation>Guardar</translation>
</message>
<message>
<source>Apply</source>
@ -1178,7 +1178,7 @@
</message>
<message>
<source>Restore Defaults</source>
<translation>Restaurar Definições</translation>
<translation>Restaurar Predefinições</translation>
</message>
<message>
<source>Cancel</source>
@ -1405,43 +1405,43 @@
</message>
<message>
<source>Play</source>
<translation type="unfinished">Play</translation>
<translation>Reproduzir</translation>
</message>
<message>
<source>Pause</source>
<translation type="unfinished">Pause</translation>
<translation>Pausa</translation>
</message>
<message>
<source>Stop</source>
<translation type="unfinished">Stop</translation>
<translation>Parar</translation>
</message>
<message>
<source>Restart</source>
<translation type="unfinished">Restart</translation>
<translation>Reiniciar</translation>
</message>
<message>
<source>Full Screen</source>
<translation type="unfinished">Full Screen</translation>
<translation>Ecrã Inteiro</translation>
</message>
<message>
<source>Controllers</source>
<translation type="unfinished">Controllers</translation>
<translation>Comandos</translation>
</message>
<message>
<source>Keyboard</source>
<translation type="unfinished">Keyboard</translation>
<translation>Teclado</translation>
</message>
<message>
<source>Refresh List</source>
<translation type="unfinished">Refresh List</translation>
<translation>Atualizar Lista</translation>
</message>
<message>
<source>Resume</source>
<translation type="unfinished">Resume</translation>
<translation>Continuar</translation>
</message>
<message>
<source>Show Labels Under Icons</source>
<translation type="unfinished">Show Labels Under Icons</translation>
<translation>Mostrar Etiquetas Debaixo dos Ícones</translation>
</message>
</context>
<context>
@ -2028,7 +2028,7 @@
</message>
<message>
<source>Cannot create portable user folder</source>
<translation>Não é possível criar pasta de utilizador portátil</translation>
<translation>Não foi possível criar pasta de utilizador portátil</translation>
</message>
<message>
<source>%1 already exists</source>
@ -2044,11 +2044,11 @@
</message>
<message>
<source>Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions.</source>
<translation>Abra a pasta de imagens/sons de troféus personalizados:\nPoderá adicionar imagens personalizadas aos troféus e um áudio.\nAdicione os arquivos na pasta custom_trophy com os seguintes nomes:\ntrophy.mp3 ou trophy.wav, bronze.png, gold.png, platinum.png, silver.png\nObservação: O som funcionará apenas nas versões Qt.</translation>
<translation>Abra a pasta de imagens/sons de troféus personalizados:\nPoderá adicionar imagens personalizadas aos troféus e um áudio.\nAdicione os ficheiros na pasta custom_trophy com os seguintes nomes:\ntrophy.mp3 ou trophy.wav, bronze.png, gold.png, platinum.png, silver.png\nObservação: O som funcionará apenas nas versões Qt.</translation>
</message>
<message>
<source> * Unsupported Vulkan Version</source>
<translation type="unfinished"> * Unsupported Vulkan Version</translation>
<translation> * Versão do Vulkan não suportada</translation>
</message>
</context>
<context>

View file

@ -2048,7 +2048,7 @@
</message>
<message>
<source> * Unsupported Vulkan Version</source>
<translation type="unfinished"> * Unsupported Vulkan Version</translation>
<translation> * Неподдерживаемая версия Vulkan</translation>
</message>
</context>
<context>

View file

@ -2048,7 +2048,7 @@
</message>
<message>
<source> * Unsupported Vulkan Version</source>
<translation type="unfinished"> * Unsupported Vulkan Version</translation>
<translation> * Version i pambështetur i Vulkan</translation>
</message>
</context>
<context>

View file

@ -2048,7 +2048,7 @@
</message>
<message>
<source> * Unsupported Vulkan Version</source>
<translation type="unfinished"> * Unsupported Vulkan Version</translation>
<translation> * Versionen av Vulkan stöds inte</translation>
</message>
</context>
<context>

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/assert.h"
#include "common/logging/log.h"
#include "shader_recompiler/backend/spirv/emit_spirv_instructions.h"
#include "shader_recompiler/backend/spirv/spirv_emit_context.h"
#include "shader_recompiler/ir/attribute.h"
@ -167,6 +168,7 @@ Id EmitReadConst(EmitContext& ctx, IR::Inst* inst) {
const auto& srt_flatbuf = ctx.buffers.back();
ASSERT(srt_flatbuf.binding >= 0 && flatbuf_off_dw > 0 &&
srt_flatbuf.buffer_type == BufferType::ReadConstUbo);
LOG_DEBUG(Render_Recompiler, "ReadConst from flatbuf dword {}", flatbuf_off_dw);
const auto [id, pointer_type] = srt_flatbuf[BufferAlias::U32];
const Id ptr{
ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, ctx.ConstU32(flatbuf_off_dw))};