Skip to content

Commit f8ee867

Browse files
committed
Merge branch 'uber_hacks' into rb4-new
2 parents 37a87fb + 726057f commit f8ee867

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1147
-1052
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
521521
src/video_core/renderer_vulkan/vk_resource_pool.h
522522
src/video_core/renderer_vulkan/vk_scheduler.cpp
523523
src/video_core/renderer_vulkan/vk_scheduler.h
524+
src/video_core/renderer_vulkan/vk_shader_cache.cpp
525+
src/video_core/renderer_vulkan/vk_shader_cache.h
524526
src/video_core/renderer_vulkan/vk_shader_util.cpp
525527
src/video_core/renderer_vulkan/vk_shader_util.h
526528
src/video_core/renderer_vulkan/vk_swapchain.cpp

src/core/libraries/avplayer/avplayer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,4 @@ void RegisterlibSceAvPlayer(Core::Loader::SymbolsResolver* sym) {
325325
LIB_FUNCTION("yN7Jhuv8g24", "libSceAvPlayer", 1, "libSceAvPlayer", 1, 0, sceAvPlayerVprintf);
326326
};
327327

328-
} // namespace Libraries::AvPlayer
328+
} // namespace Libraries::AvPlayer

src/core/libraries/kernel/threads/semaphore.cpp

+13-20
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// SPDX-License-Identifier: GPL-2.0-or-later
33

44
#include <condition_variable>
5+
#include <list>
56
#include <mutex>
6-
#include <utility>
7-
#include <boost/intrusive/list.hpp>
87
#include <pthread.h>
98
#include "common/assert.h"
109
#include "common/logging/log.h"
@@ -13,9 +12,6 @@
1312

1413
namespace Libraries::Kernel {
1514

16-
using ListBaseHook =
17-
boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>>;
18-
1915
class Semaphore {
2016
public:
2117
Semaphore(s32 init_count, s32 max_count, std::string_view name, bool is_fifo)
@@ -37,7 +33,7 @@ class Semaphore {
3733

3834
// Create waiting thread object and add it into the list of waiters.
3935
WaitingThread waiter{need_count, is_fifo};
40-
AddWaiter(waiter);
36+
AddWaiter(&waiter);
4137

4238
// Perform the wait.
4339
return waiter.Wait(lk, timeout);
@@ -52,14 +48,14 @@ class Semaphore {
5248

5349
// Wake up threads in order of priority.
5450
for (auto it = wait_list.begin(); it != wait_list.end();) {
55-
auto& waiter = *it;
56-
if (waiter.need_count > token_count) {
51+
auto* waiter = *it;
52+
if (waiter->need_count > token_count) {
5753
it++;
5854
continue;
5955
}
6056
it = wait_list.erase(it);
61-
token_count -= waiter.need_count;
62-
waiter.cv.notify_one();
57+
token_count -= waiter->need_count;
58+
waiter->cv.notify_one();
6359
}
6460

6561
return true;
@@ -70,17 +66,17 @@ class Semaphore {
7066
if (num_waiters) {
7167
*num_waiters = wait_list.size();
7268
}
73-
for (auto& waiter : wait_list) {
74-
waiter.was_cancled = true;
75-
waiter.cv.notify_one();
69+
for (auto* waiter : wait_list) {
70+
waiter->was_cancled = true;
71+
waiter->cv.notify_one();
7672
}
7773
wait_list.clear();
7874
token_count = set_count < 0 ? init_count : set_count;
7975
return ORBIS_OK;
8076
}
8177

8278
public:
83-
struct WaitingThread : public ListBaseHook {
79+
struct WaitingThread {
8480
std::condition_variable cv;
8581
u32 priority;
8682
s32 need_count;
@@ -132,24 +128,21 @@ class Semaphore {
132128
}
133129
};
134130

135-
void AddWaiter(WaitingThread& waiter) {
131+
void AddWaiter(WaitingThread* waiter) {
136132
// Insert at the end of the list for FIFO order.
137133
if (is_fifo) {
138134
wait_list.push_back(waiter);
139135
return;
140136
}
141137
// Find the first with priority less then us and insert right before it.
142138
auto it = wait_list.begin();
143-
while (it != wait_list.end() && it->priority > waiter.priority) {
139+
while (it != wait_list.end() && (*it)->priority > waiter->priority) {
144140
it++;
145141
}
146142
wait_list.insert(it, waiter);
147143
}
148144

149-
using WaitingThreads =
150-
boost::intrusive::list<WaitingThread, boost::intrusive::base_hook<ListBaseHook>,
151-
boost::intrusive::constant_time_size<false>>;
152-
WaitingThreads wait_list;
145+
std::list<WaitingThread*> wait_list;
153146
std::string name;
154147
std::atomic<s32> token_count;
155148
std::mutex mutex;

src/qt_gui/cheats_patches.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void CheatsPatches::setupUI() {
130130
// Call the method to fill the list of cheat files
131131
populateFileListCheats();
132132

133-
QLabel* repositoryLabel = new QLabel("Repository:");
133+
QLabel* repositoryLabel = new QLabel(tr("Repository:"));
134134
repositoryLabel->setAlignment(Qt::AlignLeft);
135135
repositoryLabel->setAlignment(Qt::AlignVCenter);
136136

@@ -1123,7 +1123,7 @@ void CheatsPatches::addPatchesToLayout(const QString& filePath) {
11231123
void CheatsPatches::updateNoteTextEdit(const QString& patchName) {
11241124
if (m_patchInfos.contains(patchName)) {
11251125
const PatchInfo& patchInfo = m_patchInfos[patchName];
1126-
QString text = QString(tr("Name:") + " %1\n" + tr("Author:") + " %2\n\n%3")
1126+
QString text = QString(tr("Name:") + " %1\n" + tr("Author: ") + "%2\n\n%3")
11271127
.arg(patchInfo.name)
11281128
.arg(patchInfo.author)
11291129
.arg(patchInfo.note);
@@ -1261,4 +1261,4 @@ void CheatsPatches::onPatchCheckBoxHovered(QCheckBox* checkBox, bool hovered) {
12611261
} else {
12621262
instructionsTextEdit->setText(defaultTextEdit);
12631263
}
1264-
}
1264+
}

src/qt_gui/cheats_patches.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class CheatsPatches : public QWidget {
3636
void downloadCheats(const QString& source, const QString& m_gameSerial,
3737
const QString& m_gameVersion, bool showMessageBox);
3838
void downloadPatches(const QString repository, const bool showMessageBox);
39+
void createFilesJson(const QString& repository);
3940

4041
signals:
4142
void downloadFinished();
@@ -58,7 +59,6 @@ class CheatsPatches : public QWidget {
5859
void applyCheat(const QString& modName, bool enabled);
5960
void applyPatch(const QString& patchName, bool enabled);
6061

61-
void createFilesJson(const QString& repository);
6262
void uncheckAllCheatCheckBoxes();
6363
void updateNoteTextEdit(const QString& patchName);
6464

src/qt_gui/main_window.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ void MainWindow::CreateConnects() {
391391
nullptr, tr("Download Complete"),
392392
QString(tr("Patches Downloaded Successfully!") + "\n" +
393393
tr("All Patches available for all games have been downloaded.")));
394+
cheatsPatches->createFilesJson("GoldHEN");
395+
cheatsPatches->createFilesJson("shadPS4");
394396
panelDialog->accept();
395397
});
396398
panelDialog->exec();

src/qt_gui/translations/pt_BR.ts

+28-28
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<message>
3838
<location filename="../game_info.cpp" line="26"/>
3939
<source>Loading game list, please wait :3</source>
40-
<translation>Carregando lista de jogos, por favor aguarde :3</translation>
40+
<translation>Carregando a lista de jogos, por favor aguarde :3</translation>
4141
</message>
4242
<message>
4343
<location filename="../game_info.cpp" line="26"/>
@@ -256,7 +256,7 @@
256256
<message>
257257
<location filename="../main_window_ui.h" line="343"/>
258258
<source>Download Cheats/Patches</source>
259-
<translation>Baixar Trapaças / Patches</translation>
259+
<translation>Baixar Cheats/Patches</translation>
260260
</message>
261261
<message>
262262
<location filename="../main_window_ui.h" line="345"/>
@@ -291,7 +291,7 @@
291291
<message>
292292
<location filename="../main_window_ui.h" line="354"/>
293293
<source>Game List Mode</source>
294-
<translation>Modo de Lista de Jogos</translation>
294+
<translation>Modo da Lista de Jogos</translation>
295295
</message>
296296
<message>
297297
<location filename="../main_window_ui.h" line="355"/>
@@ -425,7 +425,7 @@
425425
<message>
426426
<location filename="../settings_dialog.ui" line="235"/>
427427
<source>Log Filter</source>
428-
<translation>Filtro</translation>
428+
<translation>Filtro do Registro</translation>
429429
</message>
430430
<message>
431431
<location filename="../settings_dialog.ui" line="272"/>
@@ -508,12 +508,12 @@
508508
<message>
509509
<location filename="../main_window.cpp" line="326"/>
510510
<source>Download Cheats For All Installed Games</source>
511-
<translation>Baixar Trapaças para todos os jogos instalados</translation>
511+
<translation>Baixar Cheats para Todos os Jogos Instalados</translation>
512512
</message>
513513
<message>
514514
<location filename="../main_window.cpp" line="328"/>
515515
<source>Download Patches For All Games</source>
516-
<translation>Baixar Patches para todos os jogos</translation>
516+
<translation>Baixar Patches para Todos os Jogos</translation>
517517
</message>
518518
<message>
519519
<location filename="../main_window.cpp" line="363"/>
@@ -523,7 +523,7 @@
523523
<message>
524524
<location filename="../main_window.cpp" line="364"/>
525525
<source>You have downloaded cheats for all the games you have installed.</source>
526-
<translation>Você baixou trapaças para todos os jogos que instalou.</translation>
526+
<translation>Você baixou cheats para todos os jogos que instalou.</translation>
527527
</message>
528528
<message>
529529
<location filename="../main_window.cpp" line="391"/>
@@ -578,7 +578,7 @@
578578
<message>
579579
<location filename="../main_window.cpp" line="639"/>
580580
<source>Patch detected!\nPKG Version %1 is older </source>
581-
<translation>Patch detectado!\nVersão PKG %1 é mais antiga </translation>
581+
<translation>Patch detectado!\nVersão do PKG %1 é mais antiga </translation>
582582
</message>
583583
<message>
584584
<location filename="../main_window.cpp" line="640"/>
@@ -593,7 +593,7 @@
593593
<message>
594594
<location filename="../main_window.cpp" line="646"/>
595595
<source>Patch detected!\nGame is installed: %1\nWould you like </source>
596-
<translation>Patch detectado!\nJogo está instalado: %1\nGostaria de </translation>
596+
<translation>Patch detectado!\nO Jogo está instalado: %1\nGostaria de </translation>
597597
</message>
598598
<message>
599599
<location filename="../main_window.cpp" line="647"/>
@@ -608,22 +608,22 @@
608608
<message>
609609
<location filename="../main_window.cpp" line="673"/>
610610
<source>DLC Installation</source>
611-
<translation>DLC Installation</translation>
611+
<translation>Instalação de DLC</translation>
612612
</message>
613613
<message>
614614
<location filename="../main_window.cpp" line="674"/>
615615
<source>Would you like to install DLC: %1?</source>
616-
<translation>Would you like to install DLC: %1?</translation>
616+
<translation>Gostaria de instalar a DLC: %1?</translation>
617617
</message>
618618
<message>
619619
<location filename="../main_window.cpp" line="674"/>
620620
<source>PKG is a patch, please install the game first!</source>
621-
<translation>PKG é um patch, por favor, instale o jogo primeiro!</translation>
621+
<translation>O PKG é um patch, por favor, instale o jogo primeiro!</translation>
622622
</message>
623623
<message>
624624
<location filename="../main_window.cpp" line="681"/>
625625
<source>PKG ERROR</source>
626-
<translation>ERRO PKG</translation>
626+
<translation>ERRO de PKG</translation>
627627
</message>
628628
<message>
629629
<location filename="../main_window.cpp" line="693"/>
@@ -651,12 +651,12 @@
651651
<message>
652652
<location filename="../cheats_patches.cpp" line="44"/>
653653
<source>Cheats / Patches</source>
654-
<translation>Trapaças / Patches</translation>
654+
<translation>Cheats / Patches</translation>
655655
</message>
656656
<message>
657657
<location filename="../cheats_patches.cpp" line="50"/>
658658
<source>defaultTextEdit_MSG</source>
659-
<translation>Trapaças/Patches são experimentais.\nUse com cautela.\n\nBaixe as trapaças individualmente selecionando o repositório e clicando no botão de download.\nNa aba Patches, você pode baixar todos os Patches de uma vez, escolher qual deseja usar e salvar a opção.\n\nComo não desenvolvemos as Trapaças/Patches,\npor favor, reporte problemas relacionados ao autor da trapaça.\n\nCriou uma nova trapaça? Visite:\nhttps://github.com/shadps4-emu/ps4_cheats</translation>
659+
<translation>Cheats/Patches são experimentais.\nUse com cautela.\n\nBaixe os cheats individualmente selecionando o repositório e clicando no botão de download.\nNa aba Patches, você pode baixar todos os Patches de uma vez, escolha qual deseja usar e salve a opção.\n\nComo não desenvolvemos os Cheats/Patches,\npor favor, reporte problemas relacionados ao autor do cheat.\n\nCriou um novo cheat? Visite:\nhttps://github.com/shadps4-emu/ps4_cheats</translation>
660660
</message>
661661
<message>
662662
<location filename="../cheats_patches.cpp" line="69"/>
@@ -666,7 +666,7 @@
666666
<message>
667667
<location filename="../cheats_patches.cpp" line="79"/>
668668
<source>Serial: </source>
669-
<translation>Série: </translation>
669+
<translation>Serial: </translation>
670670
</message>
671671
<message>
672672
<location filename="../cheats_patches.cpp" line="83"/>
@@ -681,7 +681,7 @@
681681
<message>
682682
<location filename="../cheats_patches.cpp" line="126"/>
683683
<source>Select Cheat File:</source>
684-
<translation>Selecione o Arquivo de Trapaça:</translation>
684+
<translation>Selecione o Arquivo de Cheat:</translation>
685685
</message>
686686
<message>
687687
<location filename="../cheats_patches.cpp" line="133"/>
@@ -691,7 +691,7 @@
691691
<message>
692692
<location filename="../cheats_patches.cpp" line="149"/>
693693
<source>Download Cheats</source>
694-
<translation>Baixar Trapaças</translation>
694+
<translation>Baixar Cheats</translation>
695695
</message>
696696
<message>
697697
<location filename="../cheats_patches.cpp" line="155"/>
@@ -706,7 +706,7 @@
706706
<message>
707707
<location filename="../cheats_patches.cpp" line="170"/>
708708
<source>You can delete the cheats you don't want after downloading them.</source>
709-
<translation>Você pode excluir as trapaças que não deseja após baixá-las.</translation>
709+
<translation>Você pode excluir os cheats que não deseja após baixá-las.</translation>
710710
</message>
711711
<message>
712712
<location filename="../cheats_patches.cpp" line="178"/>
@@ -731,7 +731,7 @@
731731
<message>
732732
<location filename="../cheats_patches.cpp" line="256"/>
733733
<source>Cheats</source>
734-
<translation>Trapaças</translation>
734+
<translation>Cheats</translation>
735735
</message>
736736
<message>
737737
<location filename="../cheats_patches.cpp" line="257"/>
@@ -756,7 +756,7 @@
756756
<message>
757757
<location filename="../cheats_patches.cpp" line="316"/>
758758
<source>No patch file found for the current serial.</source>
759-
<translation>Nenhum arquivo de patch encontrado para a série atual.</translation>
759+
<translation>Nenhum arquivo de patch encontrado para o serial atual.</translation>
760760
</message>
761761
<message>
762762
<location filename="../cheats_patches.cpp" line="323"/>
@@ -816,22 +816,22 @@
816816
<message>
817817
<location filename="../cheats_patches.cpp" line="556"/>
818818
<source>Cheats Not Found</source>
819-
<translation>Trapaças Não Encontradas</translation>
819+
<translation>Cheats Não Encontrados</translation>
820820
</message>
821821
<message>
822822
<location filename="../cheats_patches.cpp" line="556"/>
823823
<source>CheatsNotFound_MSG</source>
824-
<translation>Nenhuma trapaça encontrada para este jogo nesta versão do repositório selecionado, tente outro repositório ou uma versão diferente do jogo.</translation>
824+
<translation>Nenhum cheat encontrado para este jogo nesta versão do repositório selecionado, tente outro repositório ou uma versão diferente do jogo.</translation>
825825
</message>
826826
<message>
827827
<location filename="../cheats_patches.cpp" line="593"/>
828828
<source>Cheats Downloaded Successfully</source>
829-
<translation>Trapaças Baixadas com Sucesso</translation>
829+
<translation>Cheats Baixados com Sucesso</translation>
830830
</message>
831831
<message>
832832
<location filename="../cheats_patches.cpp" line="594"/>
833833
<source>CheatsDownloadedSuccessfully_MSG</source>
834-
<translation>Você baixou as trapaças com sucesso. Para esta versão do jogo a partir do repositório selecionado.Você pode tentar baixar de outro repositório, se estiver disponível, também será possível usá-lo selecionando o arquivo da lista.</translation>
834+
<translation>Você baixou os cheats com sucesso. Para esta versão do jogo a partir do repositório selecionado. Você pode tentar baixar de outro repositório, se estiver disponível, também será possível usá-lo selecionando o arquivo da lista.</translation>
835835
</message>
836836
<message>
837837
<location filename="../cheats_patches.cpp" line="747"/>
@@ -851,7 +851,7 @@
851851
<message>
852852
<location filename="../cheats_patches.cpp" line="763"/>
853853
<source>DownloadComplete_MSG</source>
854-
<translation>Patches Baixados com Sucesso! Todos os patches disponíveis para todos os jogos foram baixados, não é necessário baixá-los individualmente para cada jogo como acontece com as Trapaças.</translation>
854+
<translation>Patches Baixados com Sucesso! Todos os patches disponíveis para todos os jogos foram baixados, não é necessário baixá-los individualmente para cada jogo como acontece com os Cheats.</translation>
855855
</message>
856856
<message>
857857
<location filename="../cheats_patches.cpp" line="773"/>
@@ -871,7 +871,7 @@
871871
<message>
872872
<location filename="../cheats_patches.cpp" line="819"/>
873873
<source>XML ERROR:</source>
874-
<translation>ERRO XML:</translation>
874+
<translation>ERRO de XML:</translation>
875875
</message>
876876
<message>
877877
<location filename="../cheats_patches.cpp" line="826"/>
@@ -886,7 +886,7 @@
886886
<message>
887887
<location filename="../cheats_patches.cpp" line="997"/>
888888
<source>Directory does not exist:</source>
889-
<translation>Diretório não existe:</translation>
889+
<translation>O Diretório não existe:</translation>
890890
</message>
891891
<message>
892892
<location filename="../cheats_patches.cpp" line="1006"/>

0 commit comments

Comments
 (0)