Merge remote-tracking branch 'cemu/main' into gui_fixes

This commit is contained in:
bitscher 2022-09-04 00:17:36 -07:00
commit 7193808ebb
39 changed files with 245 additions and 257 deletions

2
.gitignore vendored
View file

@ -13,6 +13,7 @@
*.out *.out
*.app *.app
.vs .vs
.idea/
build/ build/
out/ out/
@ -29,6 +30,7 @@ bin/Cemu.exe.backup
bin/mlc01/* bin/mlc01/*
bin/settings.xml bin/settings.xml
bin/title_list_cache.xml bin/title_list_cache.xml
bin/debugger/*
!bin/shaderCache/info.txt !bin/shaderCache/info.txt
bin/shaderCache/* bin/shaderCache/*

View file

@ -25,7 +25,7 @@ To compile Cemu, a recent enough compiler and STL with C++20 support is required
### Installing dependencies ### Installing dependencies
#### For Ubuntu and derivatives: #### For Ubuntu and derivatives:
`sudo apt install -y git cmake ninja-build nasm libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev libpulse-dev` `sudo apt install -y git curl cmake ninja-build nasm libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev libpulse-dev`
Additionally, for ubuntu 20.04 only: Additionally, for ubuntu 20.04 only:
- `sudo apt install -y clang-12` - `sudo apt install -y clang-12`
- At step 3 while building, use - At step 3 while building, use

View file

@ -9,6 +9,8 @@ GenericName[fi]=Wii U -emulaattori
GenericName[el]=Πρόγραμμα προσομοίωσης Wii U GenericName[el]=Πρόγραμμα προσομοίωσης Wii U
GenericName[es]=Emulador de Wii U GenericName[es]=Emulador de Wii U
GenericName[pt_BR]=Emulador de Wii U GenericName[pt_BR]=Emulador de Wii U
GenericName[fr]=Émulateur de Wii U
GenericName[it]=Emulatore Wii U
Comment=Software to emulate Wii U games and applications on PC Comment=Software to emulate Wii U games and applications on PC
Comment[fi]=Ohjelmisto Wii U -pelien ja sovellusten emulointiin PC:lla Comment[fi]=Ohjelmisto Wii U -pelien ja sovellusten emulointiin PC:lla
Comment[de]=Software zum emulieren von Wii U Spielen und Anwendungen auf dem PC Comment[de]=Software zum emulieren von Wii U Spielen und Anwendungen auf dem PC
@ -18,7 +20,7 @@ Comment[nl]=Applicatie om Wii U spellen en applicaties te emuleren op PC
Comment[el]=Πρόγραμμα προσομοίωσης παιχνιδιών και εφαρμογών Wii U στον υπολογιστή Comment[el]=Πρόγραμμα προσομοίωσης παιχνιδιών και εφαρμογών Wii U στον υπολογιστή
Comment[es]=Software para emular juegos y aplicaciones de Wii U en PC Comment[es]=Software para emular juegos y aplicaciones de Wii U en PC
Comment[pt_BR]=Software para emular jogos e aplicativos de Wii U no PC Comment[pt_BR]=Software para emular jogos e aplicativos de Wii U no PC
Comment[it]=Software per emulare giochi ed applicazioni del Wii U su PC Comment[it]=Software per emulare giochi e applicazioni per Wii U su PC
Categories=Game;Emulator; Categories=Game;Emulator;
Keywords=Nintendo; Keywords=Nintendo;
MimeType=application/x-wii-u-rom; MimeType=application/x-wii-u-rom;

View file

@ -10,7 +10,7 @@
<summary xml:lang="el">Πρόγραμμα προσομοίωσης παιχνιδιών και εφαρμογών Wii U στον υπολογιστή</summary> <summary xml:lang="el">Πρόγραμμα προσομοίωσης παιχνιδιών και εφαρμογών Wii U στον υπολογιστή</summary>
<summary xml:lang="es">Software para emular juegos y aplicaciones de Wii U en PC</summary> <summary xml:lang="es">Software para emular juegos y aplicaciones de Wii U en PC</summary>
<summary xml:lang="pt_BR">Software para emular jogos e aplicativos de Wii U no PC</summary> <summary xml:lang="pt_BR">Software para emular jogos e aplicativos de Wii U no PC</summary>
<summary xml:lang="it">Software per emulare giochi ed applicazioni del Wii U su PC</summary> <summary xml:lang="it">Software per emulare giochi e applicazioni per Wii U su PC</summary>
<summary xml:lang="fi">Ojelmisto Wii U -pelien ja -sovellusten emulointiin PC:llä</summary> <summary xml:lang="fi">Ojelmisto Wii U -pelien ja -sovellusten emulointiin PC:llä</summary>
<developer_name>Cemu Project</developer_name> <developer_name>Cemu Project</developer_name>
<launchable type="desktop-id">info.cemu.Cemu.desktop</launchable> <launchable type="desktop-id">info.cemu.Cemu.desktop</launchable>
@ -24,7 +24,7 @@
<p xml:lang="el">Το Cemu είναι ένας προσομοιωτής της κονσόλας Nintendo Wii U που υποστηρίζει τεπίσημα παιχνίδια, καθώς και μη επίσημα προγράμματα ("homebrew"), για το Wii U. Δημιουργήθηκε από τον Exzap σε C/C++.</p> <p xml:lang="el">Το Cemu είναι ένας προσομοιωτής της κονσόλας Nintendo Wii U που υποστηρίζει τεπίσημα παιχνίδια, καθώς και μη επίσημα προγράμματα ("homebrew"), για το Wii U. Δημιουργήθηκε από τον Exzap σε C/C++.</p>
<p xml:lang="es">Cemu es un emulador de Nintendo Wii U que es capaz de ejecutar la mayoría de los juegos de Wii U y homebrew en un estado jugable. Creado por Exzap, y escrito en C y C++.</p> <p xml:lang="es">Cemu es un emulador de Nintendo Wii U que es capaz de ejecutar la mayoría de los juegos de Wii U y homebrew en un estado jugable. Creado por Exzap, y escrito en C y C++.</p>
<p xml:lang="pt_BR">Cemu é um emulador de Nintendo Wii U que é capaz de executar a maioría dos jogos de Wii U e homebrew em um estado jogavel. Criado por Exzap, e escrito em C e C++.</p> <p xml:lang="pt_BR">Cemu é um emulador de Nintendo Wii U que é capaz de executar a maioría dos jogos de Wii U e homebrew em um estado jogavel. Criado por Exzap, e escrito em C e C++.</p>
<p xml:lang="it">Cemu è un emulatore del Nintendo Wii U capace di riprodurre la maggior parte dei giochi ed homebrew Wii U in stato giocabile. Creato da Exzap, e scritto in C/C++.</p> <p xml:lang="it">Cemu è un emulatore del Nintendo Wii U in grado di eseguire in stato giocabile la maggior parte dei giochi e homebrew per Wii U. Creato da Exzap, e scritto in C/C++.</p>
<p xml:lang="fi">Cemu on Wii U -emulaattori, joka pystyy toistamaan useimpia Wii U -pelejä ja homebrew'ta pelikelvollisesti. Luonut Exzap, kirjoitettu C:llä/C++:lla.</p> <p xml:lang="fi">Cemu on Wii U -emulaattori, joka pystyy toistamaan useimpia Wii U -pelejä ja homebrew'ta pelikelvollisesti. Luonut Exzap, kirjoitettu C:llä/C++:lla.</p>
<p>This emulator aims at providing both high-accuracy and performance, and is actively being developed with new features and fixes to increase compatibility, convenience and usability.</p> <p>This emulator aims at providing both high-accuracy and performance, and is actively being developed with new features and fixes to increase compatibility, convenience and usability.</p>
<p xml:lang="de">Dieser Emulator zielt darauf ab, sowohl hohe Genauigkeit als auch Leistung zu bieten, und wird aktiv mit neuen Funktionen und Korrekturen weiterentwickelt, um Kompatibilität, Komfort und Benutzerfreundlichkeit zu verbessern.</p> <p xml:lang="de">Dieser Emulator zielt darauf ab, sowohl hohe Genauigkeit als auch Leistung zu bieten, und wird aktiv mit neuen Funktionen und Korrekturen weiterentwickelt, um Kompatibilität, Komfort und Benutzerfreundlichkeit zu verbessern.</p>
@ -33,7 +33,7 @@
<p xml:lang="el">Ο προσομοιωτής αυτός στοχεύει τόσο στην ακρίβεια, όσο και στην ταχύτητα. Βελτιώνεται συνεχώς με νέες δυνατότητες και διορθώσεις που τον καθιστούν πιο βολικό, εύκολο στην χρήση και συμβατό με περισσότερα παιχνίδια.</p> <p xml:lang="el">Ο προσομοιωτής αυτός στοχεύει τόσο στην ακρίβεια, όσο και στην ταχύτητα. Βελτιώνεται συνεχώς με νέες δυνατότητες και διορθώσεις που τον καθιστούν πιο βολικό, εύκολο στην χρήση και συμβατό με περισσότερα παιχνίδια.</p>
<p xml:lang="es">Este emulador tiene como objetivo proporcionar tanto alta precisión como rendimiento y se desarrolla activamente con nuevas características y correcciones para mejorar la compatibilidad, la comodidad y la usabilidad.</p> <p xml:lang="es">Este emulador tiene como objetivo proporcionar tanto alta precisión como rendimiento y se desarrolla activamente con nuevas características y correcciones para mejorar la compatibilidad, la comodidad y la usabilidad.</p>
<p xml:lang="pt_BR">Esse emulador visa proporcionar tanto alta precisão como rendimento e está sendo ativamente desenvolvido com novas características e correções para melhorar a compatibilidade, a comodidade e a usabilidade.</p> <p xml:lang="pt_BR">Esse emulador visa proporcionar tanto alta precisão como rendimento e está sendo ativamente desenvolvido com novas características e correções para melhorar a compatibilidade, a comodidade e a usabilidade.</p>
<p xml:lang="it">Questo emulatore ha l'obiettivo di fornire sia alta precisione che alte prestazioni, ed è in continuo sviluppo con nuove funzionalità e correzioni per aumentare la compatibilità, la comodità e la fuibilità.</p> <p xml:lang="it">Questo emulatore ha l'obiettivo di fornire sia alta precisione che alte prestazioni, ed è in continuo sviluppo con nuove funzionalità e correzioni per aumentare la compatibilità, la comodità e l'usabilità.</p>
<p xml:lang="fi">Tämä emulaattori pyrkii tarjoamaan korkeaa tarkkuutta sekä suorituskykyä, ja sitä kehitetään aktiivisesti uusilla ominaisuuksilla ja korjauksilla, jotka parantavat yhteensopivuutta, mukavuutta ja käytettävyyttä..</p> <p xml:lang="fi">Tämä emulaattori pyrkii tarjoamaan korkeaa tarkkuutta sekä suorituskykyä, ja sitä kehitetään aktiivisesti uusilla ominaisuuksilla ja korjauksilla, jotka parantavat yhteensopivuutta, mukavuutta ja käytettävyyttä..</p>
<p>It was written from scratch and development on the project began roughly early 2015.</p> <p>It was written from scratch and development on the project began roughly early 2015.</p>
<p xml:lang="de">Er wird seit Anfang 2015 entwickelt.</p> <p xml:lang="de">Er wird seit Anfang 2015 entwickelt.</p>
@ -42,7 +42,7 @@
<p xml:lang="el">Το Cemu βρίσκεται υπό ανάπτυξη από το 2015.</p> <p xml:lang="el">Το Cemu βρίσκεται υπό ανάπτυξη από το 2015.</p>
<p xml:lang="es">Fue escrito desde cero y el desarrollo del proyecto comenzó aproximadamente a principios de 2015.</p> <p xml:lang="es">Fue escrito desde cero y el desarrollo del proyecto comenzó aproximadamente a principios de 2015.</p>
<p xml:lang="pt_BR">Foi escrito do zero e o desenvolvimento do projeto começou aproximadamente a princípio de 2015.</p> <p xml:lang="pt_BR">Foi escrito do zero e o desenvolvimento do projeto começou aproximadamente a princípio de 2015.</p>
<p xml:lang="it">È stato scritto da zero e lo sviluppo del progetto è iniziato circa all'inizio del 2015.</p> <p xml:lang="it">È stato scritto da zero e lo sviluppo del progetto è cominciato intorno all'inizio del 2015.</p>
<p xml:lang="fi">Se kirjoitettiin tyhjästä ja sen kehitys alkoi suunnilleen vuoden 2015 alussa.</p> <p xml:lang="fi">Se kirjoitettiin tyhjästä ja sen kehitys alkoi suunnilleen vuoden 2015 alussa.</p>
</description> </description>

View file

@ -10,7 +10,7 @@
#include "config/ActiveSettings.h" #include "config/ActiveSettings.h"
#include "Cafe/TitleList/GameInfo.h" #include "Cafe/TitleList/GameInfo.h"
#include "util/helpers/SystemException.h" #include "util/helpers/SystemException.h"
#include "Cafe/GraphicPack/GraphicPack.h" #include "Cafe/GraphicPack/GraphicPack2.h"
#include "input/InputManager.h" #include "input/InputManager.h"
@ -399,7 +399,7 @@ void cemu_initForGame()
debugger_handleEntryBreakpoint(_entryPoint); debugger_handleEntryBreakpoint(_entryPoint);
// load graphic packs // load graphic packs
forceLog_printf("------- Activate graphic packs -------"); forceLog_printf("------- Activate graphic packs -------");
graphicPack_activateForCurrentTitle(CafeSystem::GetForegroundTitleId()); GraphicPack2::ActivateForCurrentTitle();
// print audio log // print audio log
IAudioAPI::PrintLogging(); IAudioAPI::PrintLogging();
// everything initialized // everything initialized
@ -766,6 +766,7 @@ namespace CafeSystem
iosu::act::Stop(); iosu::act::Stop();
iosu::mcp::Shutdown(); iosu::mcp::Shutdown();
iosu::fsa::Shutdown(); iosu::fsa::Shutdown();
GraphicPack2::Reset();
UnmountCurrentTitle(); UnmountCurrentTitle();
sSystemRunning = false; sSystemRunning = false;
} }

View file

@ -1,127 +0,0 @@
#include "gui/wxgui.h"
#include "GraphicPack.h"
#include "config/ActiveSettings.h"
#include "Cafe/GraphicPack/GraphicPack2.h"
/*
* Loads the graphic pack if the titleId is referenced in rules.ini
*/
void graphicPack_loadGraphicPack(wchar_t* graphicPackPath)
{
fs::path rulesPath = fs::path(graphicPackPath);
rulesPath.append("rules.txt");
std::unique_ptr<FileStream> fs_rules(FileStream::openFile2(rulesPath));
if (!fs_rules)
return;
std::vector<uint8> rulesData;
fs_rules->extract(rulesData);
IniParser iniParser(rulesData, rulesPath.string());
if (!iniParser.NextSection())
{
cemuLog_force(u8"{}: Does not contain any sections", rulesPath.generic_u8string());
return;
}
if (!boost::iequals(iniParser.GetCurrentSectionName(), "Definition"))
{
cemuLog_force(u8"{}: [Definition] must be the first section", rulesPath.generic_u8string());
return;
}
auto option_version = iniParser.FindOption("version");
if (option_version)
{
sint32 versionNum = -1;
auto [ptr, ec] = std::from_chars(option_version->data(), option_version->data() + option_version->size(), versionNum);
if (ec != std::errc{})
{
cemuLog_force(u8"{}: Unable to parse version", rulesPath.generic_u8string());
return;
}
if (versionNum > GP_LEGACY_VERSION)
{
GraphicPack2::LoadGraphicPack(rulesPath.generic_wstring(), iniParser);
return;
}
}
cemuLog_force(u8"{}: Outdated graphic pack", rulesPath.generic_u8string());
}
void graphicPack_scanForGFXPackFolders(const fs::path& currentPath, std::wstring& relativePath)
{
// check if this directory has rules txt
fs::path rulesPath = fs::path(currentPath);
rulesPath.append("rules.txt");
if (fs::exists(rulesPath) && relativePath.length() != 0)
{
graphicPack_loadGraphicPack((wchar_t*)currentPath.generic_wstring().c_str());
return; // when a rules.txt file is found stop recursion
}
if (!fs::exists(currentPath))
return;
for (auto& p : fs::directory_iterator(currentPath))
{
auto& path = p.path();
if (fs::is_directory(p.status()))
{
// dir
sint32 origSize = relativePath.size();
relativePath.append(L"/");
relativePath.append(path.filename().generic_wstring());
graphicPack_scanForGFXPackFolders(path, relativePath);
relativePath.resize(origSize);
}
}
}
void graphicPack_loadAll()
{
// recursively iterate all directories in graphicPacks/ folder
std::wstring graphicPackRelativePath;
graphicPack_scanForGFXPackFolders(ActiveSettings::GetPath("graphicPacks/"), graphicPackRelativePath);
}
void graphicPack_activateForCurrentTitle(uint64 titleId)
{
// activate graphic packs
for (const auto& gp : GraphicPack2::GetGraphicPacks())
{
if (!gp->IsEnabled())
continue;
if (!gp->ContainsTitleId(titleId))
continue;
if(GraphicPack2::ActivateGraphicPack(gp))
{
if (gp->GetPresets().empty())
{
forceLog_printf("Activate graphic pack: %s", gp->GetPath().c_str());
}
else
{
std::string logLine;
logLine.assign(fmt::format("Activate graphic pack: {} [Presets: ", gp->GetPath()));
bool isFirst = true;
for (auto& itr : gp->GetPresets())
{
if(!itr->active)
continue;
if (isFirst)
isFirst = false;
else
logLine.append(",");
logLine.append(itr->name);
}
logLine.append("]");
cemuLog_log(LogType::Force, logLine);
}
}
}
}

View file

@ -1,4 +0,0 @@
#define GP_LEGACY_VERSION (2)
void graphicPack_loadAll();
void graphicPack_activateForCurrentTitle(uint64 titleId);

View file

@ -1,6 +1,6 @@
#include "Cafe/GraphicPack/GraphicPack2.h" #include "Cafe/GraphicPack/GraphicPack2.h"
#include "GraphicPack.h"
#include "config/CemuConfig.h" #include "config/CemuConfig.h"
#include "config/ActiveSettings.h"
#include "openssl/sha.h" #include "openssl/sha.h"
#include "Cafe/HW/Latte/Renderer/RendererOuputShader.h" #include "Cafe/HW/Latte/Renderer/RendererOuputShader.h"
#include "Cafe/Filesystem/fsc.h" #include "Cafe/Filesystem/fsc.h"
@ -14,6 +14,69 @@
std::vector<GraphicPackPtr> GraphicPack2::s_graphic_packs; std::vector<GraphicPackPtr> GraphicPack2::s_graphic_packs;
std::vector<GraphicPackPtr> GraphicPack2::s_active_graphic_packs; std::vector<GraphicPackPtr> GraphicPack2::s_active_graphic_packs;
std::atomic_bool GraphicPack2::s_isReady;
#define GP_LEGACY_VERSION (2)
void GraphicPack2::LoadGraphicPack(fs::path graphicPackPath)
{
fs::path rulesPath = graphicPackPath;
rulesPath.append("rules.txt");
std::unique_ptr<FileStream> fs_rules(FileStream::openFile2(rulesPath));
if (!fs_rules)
return;
std::vector<uint8> rulesData;
fs_rules->extract(rulesData);
IniParser iniParser(rulesData, rulesPath.string());
if (!iniParser.NextSection())
{
cemuLog_force("{}: Does not contain any sections", _utf8Wrapper(rulesPath));
return;
}
if (!boost::iequals(iniParser.GetCurrentSectionName(), "Definition"))
{
cemuLog_force("{}: [Definition] must be the first section", _utf8Wrapper(rulesPath));
return;
}
auto option_version = iniParser.FindOption("version");
if (option_version)
{
sint32 versionNum = -1;
auto [ptr, ec] = std::from_chars(option_version->data(), option_version->data() + option_version->size(), versionNum);
if (ec != std::errc{})
{
cemuLog_force("{}: Unable to parse version", _utf8Wrapper(rulesPath));
return;
}
if (versionNum > GP_LEGACY_VERSION)
{
GraphicPack2::LoadGraphicPack(rulesPath.generic_wstring(), iniParser);
return;
}
}
cemuLog_force("{}: Outdated graphic pack", _utf8Wrapper(rulesPath));
}
void GraphicPack2::LoadAll()
{
std::error_code ec;
fs::path basePath = ActiveSettings::GetPath("graphicPacks");
for (fs::recursive_directory_iterator it(basePath, ec); it != end(it); ++it)
{
if (!it->is_directory(ec))
continue;
fs::path gfxPackPath = it->path();
if (fs::exists(gfxPackPath / "rules.txt", ec))
{
LoadGraphicPack(gfxPackPath);
it.disable_recursion_pending(); // dont recurse deeper in a gfx pack directory
continue;
}
}
}
bool GraphicPack2::LoadGraphicPack(const std::wstring& filename, IniParser& rules) bool GraphicPack2::LoadGraphicPack(const std::wstring& filename, IniParser& rules)
{ {
@ -60,7 +123,6 @@ bool GraphicPack2::LoadGraphicPack(const std::wstring& filename, IniParser& rule
{ {
return false; return false;
} }
} }
bool GraphicPack2::ActivateGraphicPack(const std::shared_ptr<GraphicPack2>& graphic_pack) bool GraphicPack2::ActivateGraphicPack(const std::shared_ptr<GraphicPack2>& graphic_pack)
@ -94,12 +156,65 @@ bool GraphicPack2::DeactivateGraphicPack(const std::shared_ptr<GraphicPack2>& gr
return true; return true;
} }
void GraphicPack2::ActivateForCurrentTitle()
{
uint64 titleId = CafeSystem::GetForegroundTitleId();
// activate graphic packs
for (const auto& gp : GraphicPack2::GetGraphicPacks())
{
if (!gp->IsEnabled())
continue;
if (!gp->ContainsTitleId(titleId))
continue;
if (GraphicPack2::ActivateGraphicPack(gp))
{
if (gp->GetPresets().empty())
{
forceLog_printf("Activate graphic pack: %s", gp->GetPath().c_str());
}
else
{
std::string logLine;
logLine.assign(fmt::format("Activate graphic pack: {} [Presets: ", gp->GetPath()));
bool isFirst = true;
for (auto& itr : gp->GetPresets())
{
if (!itr->active)
continue;
if (isFirst)
isFirst = false;
else
logLine.append(",");
logLine.append(itr->name);
}
logLine.append("]");
cemuLog_log(LogType::Force, logLine);
}
}
}
s_isReady = true;
}
void GraphicPack2::Reset()
{
s_active_graphic_packs.clear();
s_isReady = false;
}
void GraphicPack2::ClearGraphicPacks() void GraphicPack2::ClearGraphicPacks()
{ {
s_graphic_packs.clear(); s_graphic_packs.clear();
s_active_graphic_packs.clear(); s_active_graphic_packs.clear();
} }
void GraphicPack2::WaitUntilReady()
{
while (!s_isReady)
std::this_thread::sleep_for(std::chrono::milliseconds(5));
}
GraphicPack2::GraphicPack2(std::wstring filename) GraphicPack2::GraphicPack2(std::wstring filename)
: m_filename(std::move(filename)) : m_filename(std::move(filename))
{ {

View file

@ -159,18 +159,26 @@ public:
LatteTextureView::MagFilter GetDownscalingMagFilter() const { return m_output_settings.downscale_filter; } LatteTextureView::MagFilter GetDownscalingMagFilter() const { return m_output_settings.downscale_filter; }
// static methods // static methods
static void LoadAll();
static const std::vector<std::shared_ptr<GraphicPack2>>& GetGraphicPacks() { return s_graphic_packs; } static const std::vector<std::shared_ptr<GraphicPack2>>& GetGraphicPacks() { return s_graphic_packs; }
static const std::vector<std::shared_ptr<GraphicPack2>>& GetActiveGraphicPacks() { return s_active_graphic_packs; } static const std::vector<std::shared_ptr<GraphicPack2>>& GetActiveGraphicPacks() { return s_active_graphic_packs; }
static void LoadGraphicPack(fs::path graphicPackPath);
static bool LoadGraphicPack(const std::wstring& filename, class IniParser& rules); static bool LoadGraphicPack(const std::wstring& filename, class IniParser& rules);
static bool ActivateGraphicPack(const std::shared_ptr<GraphicPack2>& graphic_pack); static bool ActivateGraphicPack(const std::shared_ptr<GraphicPack2>& graphic_pack);
static bool DeactivateGraphicPack(const std::shared_ptr<GraphicPack2>& graphic_pack); static bool DeactivateGraphicPack(const std::shared_ptr<GraphicPack2>& graphic_pack);
static void ClearGraphicPacks(); static void ClearGraphicPacks();
static void WaitUntilReady(); // wait until all graphic packs finished activation
static void ActivateForCurrentTitle();
static void Reset();
private: private:
bool Activate(); bool Activate();
bool Deactivate(); bool Deactivate();
static std::vector<std::shared_ptr<GraphicPack2>> s_graphic_packs; static std::vector<std::shared_ptr<GraphicPack2>> s_graphic_packs;
static std::vector<std::shared_ptr<GraphicPack2>> s_active_graphic_packs; static std::vector<std::shared_ptr<GraphicPack2>> s_active_graphic_packs;
static std::atomic_bool s_isReady;
template<typename TType> template<typename TType>
void FillPresetConstants(TExpressionParser<TType>& parser) const void FillPresetConstants(TExpressionParser<TType>& parser) const

View file

@ -5,7 +5,6 @@
#include "Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h" #include "Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h"
#include "Cafe/HW/Latte/Core/FetchShader.h" #include "Cafe/HW/Latte/Core/FetchShader.h"
#include "Cemu/FileCache/FileCache.h" #include "Cemu/FileCache/FileCache.h"
#include "Cafe/GraphicPack/GraphicPack.h"
#include "Cafe/GameProfile/GameProfile.h" #include "Cafe/GameProfile/GameProfile.h"
#include "gui/guiWrapper.h" #include "gui/guiWrapper.h"

View file

@ -1,7 +1,6 @@
#include "Cafe/HW/Latte/Core/LatteTexture.h" #include "Cafe/HW/Latte/Core/LatteTexture.h"
#include "Cafe/HW/Latte/Core/LatteTextureView.h" #include "Cafe/HW/Latte/Core/LatteTextureView.h"
#include "Cafe/HW/Latte/Core/Latte.h" #include "Cafe/HW/Latte/Core/Latte.h"
#include "Cafe/GraphicPack/GraphicPack.h"
#include "Cafe/GraphicPack/GraphicPack2.h" #include "Cafe/GraphicPack/GraphicPack2.h"
LatteTextureView::LatteTextureView(LatteTexture* texture, sint32 firstMip, sint32 mipCount, sint32 firstSlice, sint32 sliceCount, Latte::E_DIM dim, Latte::E_GX2SURFFMT format, bool registerView) LatteTextureView::LatteTextureView(LatteTexture* texture, sint32 firstMip, sint32 mipCount, sint32 firstSlice, sint32 sliceCount, Latte::E_DIM dim, Latte::E_GX2SURFFMT format, bool registerView)

View file

@ -5,6 +5,7 @@
#include "Cafe/HW/Latte/Core/LatteShader.h" #include "Cafe/HW/Latte/Core/LatteShader.h"
#include "Cafe/HW/Latte/Core/LatteAsyncCommands.h" #include "Cafe/HW/Latte/Core/LatteAsyncCommands.h"
#include "Cafe/GameProfile/GameProfile.h" #include "Cafe/GameProfile/GameProfile.h"
#include "Cafe/GraphicPack/GraphicPack2.h"
#include "gui/guiWrapper.h" #include "gui/guiWrapper.h"
#include "Cafe/HW/Latte/Core/LatteBufferCache.h" #include "Cafe/HW/Latte/Core/LatteBufferCache.h"
@ -188,6 +189,8 @@ int Latte_ThreadEntry()
g_renderer->DrawEmptyFrame(true); g_renderer->DrawEmptyFrame(true);
// before doing anything with game specific shaders, we need to wait for graphic packs to finish loading
GraphicPack2::WaitUntilReady();
// load/init shader cache file // load/init shader cache file
LatteShaderCache_load(); LatteShaderCache_load();

View file

@ -264,11 +264,13 @@ namespace coreinit
return "Unknown"; return "Unknown";
} }
std::mutex sCafeConsoleMutex;
void WriteCafeConsole(CafeLogType cafeLogType, const char* msg, sint32 len) void WriteCafeConsole(CafeLogType cafeLogType, const char* msg, sint32 len)
{ {
// once a line is full or \n is written it will be posted to log std::unique_lock _l(sCafeConsoleMutex);
CafeLogBuffer& logBuffer = getLogBuffer(cafeLogType); CafeLogBuffer& logBuffer = getLogBuffer(cafeLogType);
// once a line is full or \n is written it will be posted to log
auto flushLine = [](CafeLogBuffer& cafeLogBuffer, std::string_view cafeLogName) -> void auto flushLine = [](CafeLogBuffer& cafeLogBuffer, std::string_view cafeLogName) -> void
{ {
cemuLog_log(LogType::CoreinitLogging, "[{0}] {1}", cafeLogName, std::basic_string_view(cafeLogBuffer.lineBuffer.data(), cafeLogBuffer.lineLength)); cemuLog_log(LogType::CoreinitLogging, "[{0}] {1}", cafeLogName, std::basic_string_view(cafeLogBuffer.lineBuffer.data(), cafeLogBuffer.lineLength));

View file

@ -119,11 +119,6 @@ inline bool cemuLog_force(std::string_view msg)
return cemuLog_log(LogType::Force, msg); return cemuLog_log(LogType::Force, msg);
} }
inline bool cemuLog_force(std::u8string_view msg)
{
return cemuLog_log(LogType::Force, msg);
}
inline bool cemuLog_force(std::wstring_view msg) inline bool cemuLog_force(std::wstring_view msg)
{ {
return cemuLog_log(LogType::Force, msg); return cemuLog_log(LogType::Force, msg);

View file

@ -22,7 +22,7 @@ EVT_CLOSE(AudioDebuggerWindow::OnClose)
wxEND_EVENT_TABLE() wxEND_EVENT_TABLE()
AudioDebuggerWindow::AudioDebuggerWindow(wxFrame& parent) AudioDebuggerWindow::AudioDebuggerWindow(wxFrame& parent)
: wxFrame(&parent, wxID_ANY, wxT("AX voice viewer"), wxDefaultPosition, wxSize(1126, 580), wxCLOSE_BOX | wxCLIP_CHILDREN | wxCAPTION | wxRESIZE_BORDER) : wxFrame(&parent, wxID_ANY, _("AX voice viewer"), wxDefaultPosition, wxSize(1126, 580), wxCLOSE_BOX | wxCLIP_CHILDREN | wxCAPTION | wxRESIZE_BORDER)
{ {
wxPanel* mainPane = new wxPanel(this); wxPanel* mainPane = new wxPanel(this);

View file

@ -141,13 +141,13 @@ ChecksumTool::ChecksumTool(wxWindow* parent, wxTitleManagerList::TitleEntry& ent
box_sizer->Add(m_verify_online, 0, wxALL | wxEXPAND, 5); box_sizer->Add(m_verify_online, 0, wxALL | wxEXPAND, 5);
m_verify_local = new wxButton(box, wxID_ANY, _("Verify with local file")); m_verify_local = new wxButton(box, wxID_ANY, _("Verify with local file"));
m_verify_online->SetToolTip(_("Verifies the checksum with a local json file you can select")); m_verify_online->SetToolTip(_("Verifies the checksum with a local JSON file you can select"));
m_verify_local->Disable(); m_verify_local->Disable();
m_verify_local->Bind(wxEVT_BUTTON, &ChecksumTool::OnVerifyLocal, this); m_verify_local->Bind(wxEVT_BUTTON, &ChecksumTool::OnVerifyLocal, this);
box_sizer->Add(m_verify_local, 0, wxALL | wxEXPAND, 5); box_sizer->Add(m_verify_local, 0, wxALL | wxEXPAND, 5);
m_export_button = new wxButton(box, wxID_ANY, _("Export")); m_export_button = new wxButton(box, wxID_ANY, _("Export"));
m_verify_online->SetToolTip(_("Export the title checksum data to a local json file")); m_verify_online->SetToolTip(_("Export the title checksum data to a local JSON file"));
m_export_button->Disable(); m_export_button->Disable();
m_export_button->Bind(wxEVT_BUTTON, &ChecksumTool::OnExportChecksums, this); m_export_button->Bind(wxEVT_BUTTON, &ChecksumTool::OnExportChecksums, this);
box_sizer->Add(m_export_button, 0, wxALL | wxEXPAND, 5); box_sizer->Add(m_export_button, 0, wxALL | wxEXPAND, 5);
@ -477,7 +477,7 @@ void ChecksumTool::VerifyJsonEntry(const rapidjson::Document& doc)
{ {
if (test_entry.wud_hash.empty()) if (test_entry.wud_hash.empty())
{ {
wxMessageBox(_("The verification data doesn't include a wud hash!"), _("Error"), wxOK | wxCENTRE | wxICON_WARNING, this); wxMessageBox(_("The verification data doesn't include a WUD hash!"), _("Error"), wxOK | wxCENTRE | wxICON_WARNING, this);
return; return;
} }
if(!boost::iequals(test_entry.wud_hash, m_json_entry.wud_hash)) if(!boost::iequals(test_entry.wud_hash, m_json_entry.wud_hash))
@ -708,7 +708,7 @@ void ChecksumTool::DoWork()
EVP_DigestUpdate(sha256, buffer.data(), read); EVP_DigestUpdate(sha256, buffer.data(), read);
wxQueueEvent(this, new wxSetGaugeValue((int)((offset * 90) / wud_size), m_progress, m_status, wxStringFormat2(_("Reading game image: {}/{}kb"), offset / 1024, wud_size / 1024))); wxQueueEvent(this, new wxSetGaugeValue((int)((offset * 90) / wud_size), m_progress, m_status, wxStringFormat2(_("Reading game image: {0}/{1} kB"), offset / 1024, wud_size / 1024)));
} while (read != 0 && size > 0); } while (read != 0 && size > 0);
wud_close(wud); wud_close(wud);

View file

@ -92,7 +92,7 @@ void deleteDownloadedGraphicPacks()
{ {
const auto path = ActiveSettings::GetPath("graphicPacks/downloadedGraphicPacks"); const auto path = ActiveSettings::GetPath("graphicPacks/downloadedGraphicPacks");
std::error_code er; std::error_code er;
if (!fs::exists(path)) if (!fs::exists(path, er))
return; return;
try try
{ {

View file

@ -116,7 +116,7 @@ GameProfileWindow::GameProfileWindow(wxWindow* parent, uint64_t title_id)
m_graphic_api = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, (int)std::size(gapi_values), gapi_values); m_graphic_api = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, (int)std::size(gapi_values), gapi_values);
first_row->Add(m_graphic_api, 0, wxALL, 5); first_row->Add(m_graphic_api, 0, wxALL, 5);
first_row->Add(new wxStaticText(panel, wxID_ANY, _("Shader mul accuracy")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); first_row->Add(new wxStaticText(panel, wxID_ANY, _("Shader multiplication accuracy")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxString mul_values[] = { _("false"), _("true"), _("minimal") }; wxString mul_values[] = { _("false"), _("true"), _("minimal") };
m_shader_mul_accuracy = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, (int)std::size(mul_values), mul_values); m_shader_mul_accuracy = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, (int)std::size(mul_values), mul_values);

View file

@ -3,7 +3,6 @@
#include "gui/DownloadGraphicPacksWindow.h" #include "gui/DownloadGraphicPacksWindow.h"
#include "Cafe/GraphicPack/GraphicPack2.h" #include "Cafe/GraphicPack/GraphicPack2.h"
#include "config/CemuConfig.h" #include "config/CemuConfig.h"
#include "Cafe/GraphicPack/GraphicPack.h"
#include "Cafe/HW/Latte/Core/LatteAsyncCommands.h" #include "Cafe/HW/Latte/Core/LatteAsyncCommands.h"
@ -184,7 +183,7 @@ void GraphicPacksWindow2::ExpandChildren(const std::vector<wxTreeItemId>& ids, s
void GraphicPacksWindow2::RefreshGraphicPacks() void GraphicPacksWindow2::RefreshGraphicPacks()
{ {
GraphicPack2::ClearGraphicPacks(); GraphicPack2::ClearGraphicPacks();
graphicPack_loadAll(); GraphicPack2::LoadAll();
} }
GraphicPacksWindow2::GraphicPacksWindow2(wxWindow* parent, uint64_t title_id_filter) GraphicPacksWindow2::GraphicPacksWindow2(wxWindow* parent, uint64_t title_id_filter)

View file

@ -34,7 +34,6 @@
#include "gui/TitleManager.h" #include "gui/TitleManager.h"
#include "Cafe/CafeSystem.h" #include "Cafe/CafeSystem.h"
#include "Cafe/GraphicPack/GraphicPack.h"
#include "Cafe/TitleList/GameInfo.h" #include "Cafe/TitleList/GameInfo.h"
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
@ -587,10 +586,10 @@ void MainWindow::OnFileMenu(wxCommandEvent& event)
"|{}|*.wua" "|{}|*.wua"
"|{}|*.rpx;*.elf" "|{}|*.rpx;*.elf"
"|{}|*", "|{}|*",
_("All Wii U files (wud, wux, wua, iso, rpx, elf)"), _("All Wii U files (*.wud, *.wux, *.wua, *.iso, *.rpx, *.elf)"),
_("Wii U image (wud, wux, iso, wad)"), _("Wii U image (*.wud, *.wux, *.iso, *.wad)"),
_("Wii U archive (wua)"), _("Wii U archive (*.wua)"),
_("Wii U executable (rpx, elf)"), _("Wii U executable (*.rpx, *.elf)"),
_("All files (*.*)") _("All files (*.*)")
); );
@ -1770,7 +1769,7 @@ class CemuAboutDialog : public wxDialog
{ {
public: public:
CemuAboutDialog(wxWindow* parent = NULL) CemuAboutDialog(wxWindow* parent = NULL)
: wxDialog(NULL, wxID_ANY, "About Cemu", wxDefaultPosition, wxSize(500, 700)) : wxDialog(NULL, wxID_ANY, _("About Cemu"), wxDefaultPosition, wxSize(500, 700))
{ {
Create(parent); Create(parent);
} }
@ -1804,8 +1803,7 @@ public:
void AddHeaderInfo(wxWindow* parent, wxSizer* sizer) void AddHeaderInfo(wxWindow* parent, wxSizer* sizer)
{ {
char versionString[512]; auto versionString = fmt::format(_("Cemu\nVersion {0}\nCompiled on {1}\nOriginal authors: {2}").ToStdString(), BUILD_VERSION_STRING, BUILD_DATE, "Exzap, Petergov");
sprintf(versionString, "Cemu\nVersion %s\nCompiled " BUILD_DATE "\nOriginal authors: Exzap, Petergov", BUILD_VERSION_STRING);
sizer->Add(new wxStaticText(parent, wxID_ANY, versionString), wxSizerFlags().Border(wxALL, 3).Border(wxTOP, 10)); sizer->Add(new wxStaticText(parent, wxID_ANY, versionString), wxSizerFlags().Border(wxALL, 3).Border(wxTOP, 10));
sizer->Add(new wxHyperlinkCtrl(parent, -1, "https://cemu.info", "https://cemu.info"), wxSizerFlags().Expand().Border(wxTOP | wxBOTTOM, 3)); sizer->Add(new wxHyperlinkCtrl(parent, -1, "https://cemu.info", "https://cemu.info"), wxSizerFlags().Expand().Border(wxTOP | wxBOTTOM, 3));
@ -1814,7 +1812,7 @@ public:
sizer->Add(new wxStaticLine(parent), wxSizerFlags().Expand().Border(wxRIGHT, 4)); sizer->Add(new wxStaticLine(parent), wxSizerFlags().Expand().Border(wxRIGHT, 4));
sizer->AddSpacer(5); sizer->AddSpacer(5);
wxString extraInfo("" EMULATOR_NAME " is a Wii U emulator.\n\nWii and Wii U are trademarks of Nintendo.\n" EMULATOR_NAME " is not affiliated with Nintendo."); wxString extraInfo(_("Cemu is a Wii U emulator.\n\nWii and Wii U are trademarks of Nintendo.\nCemu is not affiliated with Nintendo."));
sizer->Add(new wxStaticText(parent, wxID_ANY, extraInfo), wxSizerFlags()); sizer->Add(new wxStaticText(parent, wxID_ANY, extraInfo), wxSizerFlags());
} }
@ -1824,7 +1822,7 @@ public:
sizer->Add(new wxStaticLine(parent), wxSizerFlags().Expand().Border(wxRIGHT, 4)); sizer->Add(new wxStaticLine(parent), wxSizerFlags().Expand().Border(wxRIGHT, 4));
sizer->AddSpacer(3); sizer->AddSpacer(3);
sizer->Add(new wxStaticText(parent, wxID_ANY, "Used libraries and utilities:"), wxSizerFlags().Expand().Border(wxTOP | wxBOTTOM, 2)); sizer->Add(new wxStaticText(parent, wxID_ANY, _("Used libraries and utilities:")), wxSizerFlags().Expand().Border(wxTOP | wxBOTTOM, 2));
// zLib // zLib
{ {
wxSizer* lineSizer = new wxBoxSizer(wxHORIZONTAL); wxSizer* lineSizer = new wxBoxSizer(wxHORIZONTAL);
@ -1965,7 +1963,7 @@ public:
sizer->AddSpacer(2); sizer->AddSpacer(2);
sizer->Add(new wxStaticText(parent, wxID_ANY, "Thanks to our Patreon supporters:"), wxSizerFlags().Expand().Border(wxTOP | wxBOTTOM, 2)); sizer->Add(new wxStaticText(parent, wxID_ANY, _("Thanks to our Patreon supporters:")), wxSizerFlags().Expand().Border(wxTOP | wxBOTTOM, 2));
std::vector<const char*> patreonSupporterNames{ "Maufeat", "lvlv", "F34R", "John Godgames", "Jameel Lewis", "skooks", "Cheesy", "Barrowsx", "Mored1984", "madmat007" std::vector<const char*> patreonSupporterNames{ "Maufeat", "lvlv", "F34R", "John Godgames", "Jameel Lewis", "skooks", "Cheesy", "Barrowsx", "Mored1984", "madmat007"
, "Kuhnnl", "Owen M", "lucianobugalu", "KimoMaka", "nick palma aka renaissance18", "TheGiantBros", "SpiGAndromeda" , "Kuhnnl", "Owen M", "lucianobugalu", "KimoMaka", "nick palma aka renaissance18", "TheGiantBros", "SpiGAndromeda"
@ -1995,7 +1993,7 @@ public:
sizer->Add(gridSizer, 1, wxEXPAND); sizer->Add(gridSizer, 1, wxEXPAND);
sizer->AddSpacer(2); sizer->AddSpacer(2);
sizer->Add(new wxStaticText(parent, wxID_ANY, "Special thanks:"), wxSizerFlags().Expand().Border(wxTOP, 2)); sizer->Add(new wxStaticText(parent, wxID_ANY, _("Special thanks:")), wxSizerFlags().Expand().Border(wxTOP, 2));
sizer->Add(new wxStaticText(parent, wxID_ANY, "espes - Also try XQEMU!\nWaltzz92"), wxSizerFlags().Expand().Border(wxTOP, 1)); sizer->Add(new wxStaticText(parent, wxID_ANY, "espes - Also try XQEMU!\nWaltzz92"), wxSizerFlags().Expand().Border(wxTOP, 1));
} }
@ -2038,8 +2036,8 @@ void MainWindow::RecreateMenu()
if (!m_game_launched) if (!m_game_launched)
{ {
m_loadMenuItem = m_fileMenu->Append(MAINFRAME_MENU_ID_FILE_LOAD, _("&Load")); m_loadMenuItem = m_fileMenu->Append(MAINFRAME_MENU_ID_FILE_LOAD, _("&Load..."));
m_installUpdateMenuItem = m_fileMenu->Append(MAINFRAME_MENU_ID_FILE_INSTALL_UPDATE, _("&Install game title, update or DLC")); m_installUpdateMenuItem = m_fileMenu->Append(MAINFRAME_MENU_ID_FILE_INSTALL_UPDATE, _("&Install game title, update or DLC..."));
sint32 recentFileIndex = 0; sint32 recentFileIndex = 0;
m_fileMenuSeparator0 = nullptr; m_fileMenuSeparator0 = nullptr;

View file

@ -84,12 +84,12 @@ MemorySearcherTool::MemorySearcherTool(wxFrame* parent)
{ {
wxListItem col0; wxListItem col0;
col0.SetId(0); col0.SetId(0);
col0.SetText(_("address")); col0.SetText(_("Address"));
col0.SetWidth(100); col0.SetWidth(100);
m_listResults->InsertColumn(0, col0); m_listResults->InsertColumn(0, col0);
wxListItem col1; wxListItem col1;
col1.SetId(1); col1.SetId(1);
col1.SetText(_("value")); col1.SetText(_("Value"));
col1.SetWidth(250); col1.SetWidth(250);
m_listResults->InsertColumn(1, col1); m_listResults->InsertColumn(1, col1);
} }
@ -99,11 +99,11 @@ MemorySearcherTool::MemorySearcherTool(wxFrame* parent)
m_listEntryTable->Bind(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, &MemorySearcherTool::OnEntryListRightClick, this); m_listEntryTable->Bind(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, &MemorySearcherTool::OnEntryListRightClick, this);
m_listEntryTable->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, &MemorySearcherTool::OnItemEdited, this); m_listEntryTable->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, &MemorySearcherTool::OnItemEdited, this);
{ {
m_listEntryTable->AppendTextColumn(_("description"), wxDATAVIEW_CELL_EDITABLE, 150, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE); m_listEntryTable->AppendTextColumn(_("Description"), wxDATAVIEW_CELL_EDITABLE, 150, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE);
m_listEntryTable->AppendTextColumn(_("address"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE); m_listEntryTable->AppendTextColumn(_("Address"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE);
m_listEntryTable->AppendTextColumn(_("type")); m_listEntryTable->AppendTextColumn(_("Type"));
m_listEntryTable->AppendTextColumn(_("value"), wxDATAVIEW_CELL_EDITABLE); m_listEntryTable->AppendTextColumn(_("Value"), wxDATAVIEW_CELL_EDITABLE);
m_listEntryTable->AppendToggleColumn(_("freeze"), wxDATAVIEW_CELL_ACTIVATABLE, 50, wxALIGN_LEFT, 0); m_listEntryTable->AppendToggleColumn(_("Freeze"), wxDATAVIEW_CELL_ACTIVATABLE, 50, wxALIGN_LEFT, 0);
} }
row2->AddGrowableRow(3); row2->AddGrowableRow(3);

View file

@ -21,7 +21,7 @@
extern WindowInfo g_window_info; extern WindowInfo g_window_info;
PadViewFrame::PadViewFrame(wxFrame* parent) PadViewFrame::PadViewFrame(wxFrame* parent)
: wxFrame(nullptr, wxID_ANY, "GamePad View", wxDefaultPosition, wxSize(854, 480), wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxCLOSE_BOX | wxWANTS_CHARS) : wxFrame(nullptr, wxID_ANY, _("GamePad View"), wxDefaultPosition, wxSize(854, 480), wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxCLOSE_BOX | wxWANTS_CHARS)
{ {
gui_initHandleContextFromWxWidgetsWindow(g_window_info.window_pad, this); gui_initHandleContextFromWxWidgetsWindow(g_window_info.window_pad, this);

View file

@ -121,7 +121,7 @@ wxPanel* TitleManager::CreateTitleManagerPage()
auto* save_delete = new wxButton(m_save_panel, wxID_ANY, _("Delete")); auto* save_delete = new wxButton(m_save_panel, wxID_ANY, _("Delete"));
save_delete->Bind(wxEVT_BUTTON, &TitleManager::OnSaveDelete, this); save_delete->Bind(wxEVT_BUTTON, &TitleManager::OnSaveDelete, this);
save_delete->SetToolTip(_("Irrevocable delete the save entry ")); save_delete->SetToolTip(_("Permanently delete the save entry"));
save_delete->Disable(); save_delete->Disable();
save_sizer->Add(save_delete, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); save_sizer->Add(save_delete, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
@ -328,7 +328,7 @@ void TitleManager::OnTitleSearchComplete(wxCommandEvent& event)
} }
// update status bar text // update status bar text
m_title_list->SortEntries(-1); m_title_list->SortEntries(-1);
m_status_bar->SetStatusText(wxStringFormat2(_("Found {} titles, {} updates, {} DLCs and {} save entries"), m_status_bar->SetStatusText(wxStringFormat2(_("Found {0} games, {1} updates, {2} DLCs and {3} save entries"),
m_title_list->GetCountByType(wxTitleManagerList::EntryType::Base) + m_title_list->GetCountByType(wxTitleManagerList::EntryType::System), m_title_list->GetCountByType(wxTitleManagerList::EntryType::Base) + m_title_list->GetCountByType(wxTitleManagerList::EntryType::System),
m_title_list->GetCountByType(wxTitleManagerList::EntryType::Update), m_title_list->GetCountByType(wxTitleManagerList::EntryType::Update),
m_title_list->GetCountByType(wxTitleManagerList::EntryType::Dlc), m_title_list->GetCountByType(wxTitleManagerList::EntryType::Dlc),
@ -680,7 +680,7 @@ void TitleManager::OnSaveExport(wxCommandEvent& event)
auto* metabuff = zip_source_buffer(zip, metacontent.data(), metacontent.size(), 0); auto* metabuff = zip_source_buffer(zip, metacontent.data(), metacontent.size(), 0);
if(zip_file_add(zip, "cemu_meta", metabuff, ZIP_FL_ENC_UTF_8) < 0) if(zip_file_add(zip, "cemu_meta", metabuff, ZIP_FL_ENC_UTF_8) < 0)
{ {
const auto error_msg = wxStringFormat2(_("Error when trying to add a cemu_meta to the zip:\n{}"), zip_strerror(zip)); const auto error_msg = wxStringFormat2(_("Error when trying to add cemu_meta file to the zip:\n{}"), zip_strerror(zip));
wxMessageBox(error_msg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR, this); wxMessageBox(error_msg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR, this);
zip_source_free(metabuff); zip_source_free(metabuff);

View file

@ -91,7 +91,7 @@ void wxDownloadManagerList::AddColumns()
{ {
wxListItem col0; wxListItem col0;
col0.SetId(ColumnTitleId); col0.SetId(ColumnTitleId);
col0.SetText(_("Title id")); col0.SetText(_("Title ID"));
col0.SetWidth(120); col0.SetWidth(120);
InsertColumn(ColumnTitleId, col0); InsertColumn(ColumnTitleId, col0);

View file

@ -275,23 +275,27 @@ void wxGameList::UpdateItemColors(sint32 startIndex)
} }
} }
static inline int strongorder_to_int(const std::strong_ordering &wo)
{
/* No easy conversion seems to exists in C++20 */
if (wo < 0)
return -1;
else if (wo > 0)
return 1;
return 0;
}
int wxGameList::SortComparator(uint64 titleId1, uint64 titleId2, SortData* sortData) int wxGameList::SortComparator(uint64 titleId1, uint64 titleId2, SortData* sortData)
{ {
//if(sortData->column == ColumnGameStarted) const auto isFavoriteA = GetConfig().IsGameListFavorite(titleId1);
// return boost::ilexicographical_compare(name1, name2) ? 0 : 1; const auto isFavoriteB = GetConfig().IsGameListFavorite(titleId2);
const auto& name1 = GetNameByTitleId(titleId1);
const auto& name2 = GetNameByTitleId(titleId2);
if(sortData->dir > 0)
bool isFavoriteA = GetConfig().IsGameListFavorite(titleId1); return strongorder_to_int(std::tie(isFavoriteB, name1) <=> std::tie(isFavoriteA, name2));
bool isFavoriteB = GetConfig().IsGameListFavorite(titleId2); else
if (isFavoriteA != isFavoriteB) return strongorder_to_int(std::tie(isFavoriteB, name2) <=> std::tie(isFavoriteA, name1));
return isFavoriteB;
// default to name
std::string name1 = GetNameByTitleId(titleId1);
std::string name2 = GetNameByTitleId(titleId2);
if(sortData->dir)
return boost::ilexicographical_compare(name1, name2) ? 0 : 1;
return boost::ilexicographical_compare(name1, name2) ? 1 : 0;
} }
int wxGameList::SortFunction(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData) int wxGameList::SortFunction(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
@ -469,7 +473,7 @@ void wxGameList::OnContextMenu(wxContextMenuEvent& event)
menu.Append(kContextMenuStart, _("&Start")); menu.Append(kContextMenuStart, _("&Start"));
bool isFavorite = false; bool isFavorite = GetConfig().IsGameListFavorite(title_id);
std::error_code ec; std::error_code ec;
menu.AppendSeparator(); menu.AppendSeparator();
@ -820,20 +824,13 @@ int wxGameList::FindInsertPosition(TitleId titleId)
if (itemCount == 0) if (itemCount == 0)
return 0; return 0;
// todo - optimize this with binary search // todo - optimize this with binary search
int linearScanIndex = 0;
if (SortComparator(titleId, (uint64)GetItemData(0), &data)) for (int i = 0; i < itemCount; i++)
{ {
linearScanIndex = itemCount; if (SortComparator(titleId, (uint64)GetItemData(i), &data) <= 0)
for (int i = 1; i < itemCount - 1; i++) return i;
{
if (!SortComparator(titleId, (uint64)GetItemData(i), &data))
{
linearScanIndex = i;
break;
} }
} return itemCount;
}
return linearScanIndex;
} }
void wxGameList::OnGameEntryUpdatedByTitleId(wxTitleIdEvent& event) void wxGameList::OnGameEntryUpdatedByTitleId(wxTitleIdEvent& event)

View file

@ -123,7 +123,7 @@ void wxTitleManagerList::AddColumns()
{ {
wxListItem col0; wxListItem col0;
col0.SetId(ColumnTitleId); col0.SetId(ColumnTitleId);
col0.SetText(_("Title id")); col0.SetText(_("Title ID"));
col0.SetWidth(120); col0.SetWidth(120);
InsertColumn(ColumnTitleId, col0); InsertColumn(ColumnTitleId, col0);

View file

@ -25,7 +25,7 @@ enum ItemColumns
}; };
BreakpointWindow::BreakpointWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size) BreakpointWindow::BreakpointWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size)
: wxFrame(&parent, wxID_ANY, "Breakpoints", wxDefaultPosition, wxSize(420, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT) : wxFrame(&parent, wxID_ANY, _("Breakpoints"), wxDefaultPosition, wxSize(420, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT)
{ {
this->SetSizeHints(wxDefaultSize, wxDefaultSize); this->SetSizeHints(wxDefaultSize, wxDefaultSize);

View file

@ -267,7 +267,7 @@ void DebuggerWindow2::LoadModuleStorage(const RPLModule* module)
} }
DebuggerWindow2::DebuggerWindow2(wxFrame& parent, const wxRect& display_size) DebuggerWindow2::DebuggerWindow2(wxFrame& parent, const wxRect& display_size)
: wxFrame(&parent, wxID_ANY, wxT("PPC Debugger"), wxDefaultPosition, wxSize(1280, 300), wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT), : wxFrame(&parent, wxID_ANY, _("PPC Debugger"), wxDefaultPosition, wxSize(1280, 300), wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT),
m_module_address(0) m_module_address(0)
{ {
this->wxWindowBase::SetBackgroundColour(*wxWHITE); this->wxWindowBase::SetBackgroundColour(*wxWHITE);

View file

@ -15,7 +15,7 @@ enum
}; };
DumpWindow::DumpWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size) DumpWindow::DumpWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size)
: wxFrame(&parent, wxID_ANY, wxT("Memory Dump"), wxDefaultPosition, wxSize(600, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT) : wxFrame(&parent, wxID_ANY, _("Memory Dump"), wxDefaultPosition, wxSize(600, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT)
{ {
this->wxWindowBase::SetBackgroundColour(*wxWHITE); this->wxWindowBase::SetBackgroundColour(*wxWHITE);

View file

@ -20,7 +20,7 @@ enum ItemColumns
}; };
ModuleWindow::ModuleWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size) ModuleWindow::ModuleWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size)
: wxFrame(&parent, wxID_ANY, "Modules", wxDefaultPosition, wxSize(420, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT) : wxFrame(&parent, wxID_ANY, _("Modules"), wxDefaultPosition, wxSize(420, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT)
{ {
this->SetSizeHints(wxDefaultSize, wxDefaultSize); this->SetSizeHints(wxDefaultSize, wxDefaultSize);

View file

@ -28,7 +28,7 @@ enum
}; };
RegisterWindow::RegisterWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size) RegisterWindow::RegisterWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size)
: wxFrame(&parent, wxID_ANY, "Register View", wxDefaultPosition, wxSize(400, 975), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT), : wxFrame(&parent, wxID_ANY, _("Register View"), wxDefaultPosition, wxSize(400, 975), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT),
m_prev_snapshot({}), m_show_double_values(true), m_context_ctrl(nullptr) m_prev_snapshot({}), m_show_double_values(true), m_context_ctrl(nullptr)
{ {
SetSizeHints(wxDefaultSize, wxDefaultSize); SetSizeHints(wxDefaultSize, wxDefaultSize);
@ -75,7 +75,7 @@ RegisterWindow::RegisterWindow(DebuggerWindow2& parent, const wxPoint& main_posi
sizer->Add(gpr_sizer, 1, wxEXPAND); sizer->Add(gpr_sizer, 1, wxEXPAND);
auto button = new wxButton(scrolled_win, wxID_ANY, "FP view mode"); auto button = new wxButton(scrolled_win, wxID_ANY, _("FP view mode"));
button->Bind(wxEVT_BUTTON, &RegisterWindow::OnFPViewModePress, this); button->Bind(wxEVT_BUTTON, &RegisterWindow::OnFPViewModePress, this);
sizer->Add(button, 0, wxALL, 5); sizer->Add(button, 0, wxALL, 5);

View file

@ -13,7 +13,7 @@ enum ItemColumns
}; };
SymbolWindow::SymbolWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size) SymbolWindow::SymbolWindow(DebuggerWindow2& parent, const wxPoint& main_position, const wxSize& main_size)
: wxFrame(&parent, wxID_ANY, wxT("Symbol Window"), wxDefaultPosition, wxSize(600, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT) : wxFrame(&parent, wxID_ANY, _("Symbol Window"), wxDefaultPosition, wxSize(600, 250), wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT)
{ {
this->wxWindowBase::SetBackgroundColour(*wxWHITE); this->wxWindowBase::SetBackgroundColour(*wxWHITE);

View file

@ -31,7 +31,7 @@ SaveImportWindow::SaveImportWindow(wxWindow* parent, uint64 title_id)
row1->Add(new wxStaticText(this, wxID_ANY, _("Source")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); row1->Add(new wxStaticText(this, wxID_ANY, _("Source")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
m_source_selection = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, m_source_selection = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString,
_("Select a zipped save file"), _("Select a zipped save file"),
wxStringFormat2(_("Import save entry {}"), "(*.zip)|*.zip")); wxStringFormat2("{}|*.zip", _("Save entry (*.zip)")));
m_source_selection->SetMinSize({ 270, -1 }); m_source_selection->SetMinSize({ 270, -1 });
row1->Add(m_source_selection, 1, wxALL | wxEXPAND, 5); row1->Add(m_source_selection, 1, wxALL | wxEXPAND, 5);

View file

@ -35,9 +35,6 @@
bool g_inputConfigWindowHasFocus = false; bool g_inputConfigWindowHasFocus = false;
// _("<profile name>")
const wxString kDefaultProfileName = "<profile name>";
using wxTypeData = wxCustomData<EmulatedController::Type>; using wxTypeData = wxCustomData<EmulatedController::Type>;
using wxControllerData = wxCustomData<ControllerPtr>; using wxControllerData = wxCustomData<ControllerPtr>;
@ -149,7 +146,7 @@ wxWindow* InputSettings2::initialize_page(size_t index)
{ {
// profile // profile
sizer->Add(new wxStaticText(page, wxID_ANY, _("Profile"), wxDefaultPosition, wxDefaultSize, 0), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5); sizer->Add(new wxStaticText(page, wxID_ANY, _("Profile"), wxDefaultPosition, wxDefaultSize, 0), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
auto* profiles = new wxComboBox(page, wxID_ANY, _(kDefaultProfileName)); auto* profiles = new wxComboBox(page, wxID_ANY, kDefaultProfileName);
sizer->Add(profiles, wxGBPosition(0, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 5); sizer->Add(profiles, wxGBPosition(0, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 5);
if (emulated_controller && emulated_controller->has_profile_name()) if (emulated_controller && emulated_controller->has_profile_name())
@ -678,7 +675,7 @@ void InputSettings2::on_profile_delete(wxCommandEvent& event)
const fs::path path = ActiveSettings::GetPath(fmt::format("controllerProfiles/{}.xml", selection)); const fs::path path = ActiveSettings::GetPath(fmt::format("controllerProfiles/{}.xml", selection));
fs::remove(path); fs::remove(path);
profile_names->ChangeValue(_(kDefaultProfileName)); profile_names->ChangeValue(kDefaultProfileName);
text->SetLabelText(_("profile deleted")); text->SetLabelText(_("profile deleted"));
text->SetForegroundColour(wxTheColourDatabase->Find("SUCCESS")); text->SetForegroundColour(wxTheColourDatabase->Find("SUCCESS"));

View file

@ -18,6 +18,8 @@ public:
~InputSettings2(); ~InputSettings2();
private: private:
const wxString kDefaultProfileName = _("<profile name>");
wxNotebook* m_notebook; wxNotebook* m_notebook;
wxTimer* m_timer; wxTimer* m_timer;

View file

@ -45,67 +45,67 @@ DebugPPCThreadsWindow::DebugPPCThreadsWindow(wxFrame& parent)
// add columns // add columns
wxListItem col0; wxListItem col0;
col0.SetId(0); col0.SetId(0);
col0.SetText(_("Address")); col0.SetText("Address");
col0.SetWidth(75); col0.SetWidth(75);
m_thread_list->InsertColumn(0, col0); m_thread_list->InsertColumn(0, col0);
wxListItem col1; wxListItem col1;
col1.SetId(1); col1.SetId(1);
col1.SetText(_("Entry")); col1.SetText("Entry");
col1.SetWidth(75); col1.SetWidth(75);
m_thread_list->InsertColumn(1, col1); m_thread_list->InsertColumn(1, col1);
wxListItem col2; wxListItem col2;
col2.SetId(2); col2.SetId(2);
col2.SetText(_("Stack")); col2.SetText("Stack");
col2.SetWidth(145); col2.SetWidth(145);
m_thread_list->InsertColumn(2, col2); m_thread_list->InsertColumn(2, col2);
wxListItem col3; wxListItem col3;
col3.SetId(3); col3.SetId(3);
col3.SetText(_("PC")); col3.SetText("PC");
col3.SetWidth(120); col3.SetWidth(120);
m_thread_list->InsertColumn(3, col3); m_thread_list->InsertColumn(3, col3);
wxListItem colLR; wxListItem colLR;
colLR.SetId(4); colLR.SetId(4);
colLR.SetText(_("LR")); colLR.SetText("LR");
colLR.SetWidth(75); colLR.SetWidth(75);
m_thread_list->InsertColumn(4, colLR); m_thread_list->InsertColumn(4, colLR);
wxListItem col4; wxListItem col4;
col4.SetId(5); col4.SetId(5);
col4.SetText(_("State")); col4.SetText("State");
col4.SetWidth(90); col4.SetWidth(90);
m_thread_list->InsertColumn(5, col4); m_thread_list->InsertColumn(5, col4);
wxListItem col5; wxListItem col5;
col5.SetId(6); col5.SetId(6);
col5.SetText(_("Affinity")); col5.SetText("Affinity");
col5.SetWidth(70); col5.SetWidth(70);
m_thread_list->InsertColumn(6, col5); m_thread_list->InsertColumn(6, col5);
wxListItem colPriority; wxListItem colPriority;
colPriority.SetId(7); colPriority.SetId(7);
colPriority.SetText(_("Priority")); colPriority.SetText("Priority");
colPriority.SetWidth(80); colPriority.SetWidth(80);
m_thread_list->InsertColumn(7, colPriority); m_thread_list->InsertColumn(7, colPriority);
wxListItem col6; wxListItem col6;
col6.SetId(8); col6.SetId(8);
col6.SetText(_("SliceStart")); col6.SetText("SliceStart");
col6.SetWidth(110); col6.SetWidth(110);
m_thread_list->InsertColumn(8, col6); m_thread_list->InsertColumn(8, col6);
wxListItem col7; wxListItem col7;
col7.SetId(9); col7.SetId(9);
col7.SetText(_("SumWakeTime")); col7.SetText("SumWakeTime");
col7.SetWidth(110); col7.SetWidth(110);
m_thread_list->InsertColumn(9, col7); m_thread_list->InsertColumn(9, col7);
wxListItem col8; wxListItem col8;
col8.SetId(10); col8.SetId(10);
col8.SetText(_("ThreadName")); col8.SetText("ThreadName");
col8.SetWidth(180); col8.SetWidth(180);
m_thread_list->InsertColumn(10, col8); m_thread_list->InsertColumn(10, col8);
wxListItem col9; wxListItem col9;
col9.SetId(11); col9.SetId(11);
col9.SetText(_("GPR")); col9.SetText("GPR");
col9.SetWidth(180); col9.SetWidth(180);
m_thread_list->InsertColumn(11, col9); m_thread_list->InsertColumn(11, col9);
wxListItem col10; wxListItem col10;
col10.SetId(12); col10.SetId(12);
col10.SetText(_("Extra info")); col10.SetText("Extra info");
col10.SetWidth(180); col10.SetWidth(180);
m_thread_list->InsertColumn(12, col10); m_thread_list->InsertColumn(12, col10);

View file

@ -51,57 +51,57 @@ TextureRelationViewerWindow::TextureRelationViewerWindow(wxFrame& parent)
wxListItem col0; wxListItem col0;
sint32 columnIndex = 0; sint32 columnIndex = 0;
col0.SetId(columnIndex); columnIndex++; col0.SetId(columnIndex); columnIndex++;
col0.SetText(_("Type")); col0.SetText("Type");
col0.SetWidth(85); col0.SetWidth(85);
textureRelationListA->InsertColumn(columnIndex-1, col0); textureRelationListA->InsertColumn(columnIndex-1, col0);
wxListItem col1; wxListItem col1;
col1.SetId(columnIndex); columnIndex++; col1.SetId(columnIndex); columnIndex++;
col1.SetText(_("PhysAddr")); col1.SetText("PhysAddr");
col1.SetWidth(80); col1.SetWidth(80);
textureRelationListA->InsertColumn(columnIndex-1, col1); textureRelationListA->InsertColumn(columnIndex-1, col1);
wxListItem col2; wxListItem col2;
col2.SetId(columnIndex); columnIndex++; col2.SetId(columnIndex); columnIndex++;
col2.SetText(_("Dim")); col2.SetText("Dim");
col2.SetWidth(80); col2.SetWidth(80);
textureRelationListA->InsertColumn(columnIndex-1, col2); textureRelationListA->InsertColumn(columnIndex-1, col2);
wxListItem col3; wxListItem col3;
col3.SetId(columnIndex); columnIndex++; col3.SetId(columnIndex); columnIndex++;
col3.SetText(_("Resolution")); col3.SetText("Resolution");
col3.SetWidth(110); col3.SetWidth(110);
textureRelationListA->InsertColumn(columnIndex-1, col3); textureRelationListA->InsertColumn(columnIndex-1, col3);
wxListItem col5; wxListItem col5;
col5.SetId(columnIndex); columnIndex++; col5.SetId(columnIndex); columnIndex++;
col5.SetText(_("Format")); col5.SetText("Format");
col5.SetWidth(70); col5.SetWidth(70);
textureRelationListA->InsertColumn(columnIndex-1, col5); textureRelationListA->InsertColumn(columnIndex-1, col5);
wxListItem colPriority; wxListItem colPriority;
colPriority.SetId(columnIndex); columnIndex++; colPriority.SetId(columnIndex); columnIndex++;
colPriority.SetText(_("Pitch")); colPriority.SetText("Pitch");
colPriority.SetWidth(80); colPriority.SetWidth(80);
textureRelationListA->InsertColumn(columnIndex-1, colPriority); textureRelationListA->InsertColumn(columnIndex-1, colPriority);
wxListItem col6; wxListItem col6;
col6.SetId(columnIndex); columnIndex++; col6.SetId(columnIndex); columnIndex++;
col6.SetText(_("Tilemode")); col6.SetText("Tilemode");
col6.SetWidth(80); col6.SetWidth(80);
textureRelationListA->InsertColumn(columnIndex-1, col6); textureRelationListA->InsertColumn(columnIndex-1, col6);
wxListItem col7; wxListItem col7;
col7.SetId(columnIndex); columnIndex++; col7.SetId(columnIndex); columnIndex++;
col7.SetText(_("SliceRange")); col7.SetText("SliceRange");
col7.SetWidth(90); col7.SetWidth(90);
textureRelationListA->InsertColumn(columnIndex-1, col7); textureRelationListA->InsertColumn(columnIndex-1, col7);
wxListItem col8; wxListItem col8;
col8.SetId(columnIndex); columnIndex++; col8.SetId(columnIndex); columnIndex++;
col8.SetText(_("MipRange")); col8.SetText("MipRange");
col8.SetWidth(90); col8.SetWidth(90);
textureRelationListA->InsertColumn(columnIndex-1, col8); textureRelationListA->InsertColumn(columnIndex-1, col8);
wxListItem colAge; wxListItem colAge;
colAge.SetId(columnIndex); columnIndex++; colAge.SetId(columnIndex); columnIndex++;
colAge.SetText(_("Last access")); colAge.SetText("Last access");
colAge.SetWidth(90); colAge.SetWidth(90);
textureRelationListA->InsertColumn(columnIndex - 1, colAge); textureRelationListA->InsertColumn(columnIndex - 1, colAge);
wxListItem colOverwriteRes; wxListItem colOverwriteRes;
colOverwriteRes.SetId(columnIndex); columnIndex++; colOverwriteRes.SetId(columnIndex); columnIndex++;
colOverwriteRes.SetText(_("OverwriteRes")); colOverwriteRes.SetText("OverwriteRes");
colOverwriteRes.SetWidth(110); colOverwriteRes.SetWidth(110);
textureRelationListA->InsertColumn(columnIndex - 1, colOverwriteRes); textureRelationListA->InsertColumn(columnIndex - 1, colOverwriteRes);

View file

@ -6,7 +6,7 @@
#include "Cafe/OS/RPL/rpl_symbol_storage.h" #include "Cafe/OS/RPL/rpl_symbol_storage.h"
#include "Cafe/OS/libs/gx2/GX2.h" #include "Cafe/OS/libs/gx2/GX2.h"
#include "Cafe/GameProfile/GameProfile.h" #include "Cafe/GameProfile/GameProfile.h"
#include "Cafe/GraphicPack/GraphicPack.h" #include "Cafe/GraphicPack/GraphicPack2.h"
#include "config/CemuConfig.h" #include "config/CemuConfig.h"
#include "gui/CemuApp.h" #include "gui/CemuApp.h"
#include "Cafe/HW/Latte/Core/LatteOverlay.h" #include "Cafe/HW/Latte/Core/LatteOverlay.h"
@ -221,7 +221,7 @@ void mainEmulatorCommonInit()
// static initialization // static initialization
IAudioAPI::InitializeStatic(); IAudioAPI::InitializeStatic();
// load graphic packs (must happen before config is loaded) // load graphic packs (must happen before config is loaded)
graphicPack_loadAll(); GraphicPack2::LoadAll();
// initialize file system // initialize file system
fsc_init(); fsc_init();
} }