diff --git a/.gitignore b/.gitignore index 93d2b94e..186dbd69 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ build/ out/ .cache/ +bin/Cemu # Cemu bin files bin/otp.bin @@ -32,4 +33,4 @@ bin/shaderCache/* bin/controllerProfiles/* !bin/gameProfiles/default/* -bin/gameProfiles/* \ No newline at end of file +bin/gameProfiles/* diff --git a/dist/linux/info.cemu.Cemu.desktop b/dist/linux/info.cemu.Cemu.desktop index e23102d8..49679c9d 100644 --- a/dist/linux/info.cemu.Cemu.desktop +++ b/dist/linux/info.cemu.Cemu.desktop @@ -7,6 +7,7 @@ Exec=cemu Comment=Software to emulate Wii U games and applications on PC Comment[de]=Software zum emulieren von Wii U Spielen und Anwendungen auf dem PC Comment[ru]=Программа для эмуляции игр и приложений Wii U на PC +Comment[fr]=Application pour émuler des jeux et des applications Wii U sur PC Categories=Game;Emulator; Keywords=Nintendo; MimeType=application/x-wii-u-rom; diff --git a/dist/linux/info.cemu.Cemu.metainfo.xml b/dist/linux/info.cemu.Cemu.metainfo.xml index 2535cbf8..4016522d 100644 --- a/dist/linux/info.cemu.Cemu.metainfo.xml +++ b/dist/linux/info.cemu.Cemu.metainfo.xml @@ -5,6 +5,7 @@ Cemu Software to emulate Wii U games and applications on PC Software zum emulieren von Wii U Spielen und Anwendungen auf dem PC + Application pour émuler des jeux et applications Wii U sur PC Cemu Project info.cemu.Cemu.desktop CC0-1.0 @@ -12,10 +13,13 @@

Cemu is a Nintendo Wii U emulator that is able to run most Wii U games and homebrew in a playable state. Created by Exzap, and written in C/C++.

Cemu ist ein Nintendo Wii U-Emulator, der die meisten Wii U Spiele und Homebrew in einem spielbaren Zustand ausführen kann. Erstellt von Exzap, und geschrieben in C/C++.

+

Cemu est un émulateur de Wii U capable de lancer la plupart des jeux Wii U et des homebrews en interface de jeu. Crée par Exzap, et développé en C/C++.

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.

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.

+

Cet émulateur vise à la fois à offrir fidélité et performance, il est activement développé avec des nouvelles fonctionnalités et des correctifs pour augmenter la compatibilité, la commodité et la facilité d'utilisation.

It was written from scratch and development on the project began roughly early 2015.

Er wird seit Anfang 2015 entwickelt.

+

Il a été écrit à partir de zéro et son développement a débuté vers le début de l'année 2015.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 49f79e21..fd2c4add 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,7 +28,11 @@ elseif(UNIX) add_definitions(-fpermissive) add_definitions(-maes) # warnings - add_compile_options(-Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -Wno-ambiguous-reversed-operator) + if(CMAKE_C_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wno-ambiguous-reversed-operator) + endif() + + add_compile_options(-Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion) endif() add_definitions(-DVK_NO_PROTOTYPES) diff --git a/src/Cafe/CMakeLists.txt b/src/Cafe/CMakeLists.txt index 1e3fe306..b9d16185 100644 --- a/src/Cafe/CMakeLists.txt +++ b/src/Cafe/CMakeLists.txt @@ -31,4 +31,4 @@ target_link_libraries(CemuCafe ih264d zarchive) IF(WIN32) target_link_libraries(CemuCafe iphlpapi) -ENDIF() \ No newline at end of file +ENDIF() diff --git a/src/Cafe/Filesystem/fsc.h b/src/Cafe/Filesystem/fsc.h index d63b7c2d..972d5d0a 100644 --- a/src/Cafe/Filesystem/fsc.h +++ b/src/Cafe/Filesystem/fsc.h @@ -216,4 +216,4 @@ struct CoreinitFSParsedPath void coreinitFS_parsePath(CoreinitFSParsedPath* parsedPath, const char* path); bool coreinitFS_checkNodeName(CoreinitFSParsedPath* parsedPath, sint32 index, const char* name); -char* coreinitFS_getNodeName(CoreinitFSParsedPath* parsedPath, sint32 index); \ No newline at end of file +char* coreinitFS_getNodeName(CoreinitFSParsedPath* parsedPath, sint32 index); diff --git a/src/Cafe/HW/Latte/Core/LatteOverlay.cpp b/src/Cafe/HW/Latte/Core/LatteOverlay.cpp index 102520db..db93b840 100644 --- a/src/Cafe/HW/Latte/Core/LatteOverlay.cpp +++ b/src/Cafe/HW/Latte/Core/LatteOverlay.cpp @@ -13,6 +13,8 @@ #include "input/InputManager.h" +#include + #if BOOST_OS_WINDOWS #include #include @@ -405,16 +407,16 @@ void LatteOverlay_RenderNotifications(ImVec2& position, ImVec2& pivot, sint32 di if (s_pipeline_count_async > 0) { if (s_pipeline_count > 1) - ImGui::Text("Compiled %d new pipelines... (%d async) TotalSync: %lldms", s_pipeline_count, s_pipeline_count_async, totalTime); + ImGui::Text("Compiled %d new pipelines... (%d async) TotalSync: %" PRIu64 "ms", s_pipeline_count, s_pipeline_count_async, totalTime); else - ImGui::Text("Compiled %d new pipeline... (%d async) TotalSync: %lldms", s_pipeline_count, s_pipeline_count_async, totalTime); + ImGui::Text("Compiled %d new pipeline... (%d async) TotalSync: %" PRIu64 "ms", s_pipeline_count, s_pipeline_count_async, totalTime); } else { if (s_pipeline_count > 1) - ImGui::Text("Compiled %d new pipelines... TotalSync: %lldms", s_pipeline_count, totalTime); + ImGui::Text("Compiled %d new pipelines... TotalSync: %" PRIu64 "ms", s_pipeline_count, totalTime); else - ImGui::Text("Compiled %d new pipeline... TotalSync: %lldms", s_pipeline_count, totalTime); + ImGui::Text("Compiled %d new pipeline... TotalSync: %" PRIu64 "ms", s_pipeline_count, totalTime); } #else if (s_pipeline_count_async > 0) diff --git a/src/Cafe/OS/libs/nn_acp/nn_acp.cpp b/src/Cafe/OS/libs/nn_acp/nn_acp.cpp index 97f183c1..48aa3c00 100644 --- a/src/Cafe/OS/libs/nn_acp/nn_acp.cpp +++ b/src/Cafe/OS/libs/nn_acp/nn_acp.cpp @@ -5,6 +5,7 @@ #include "Cafe/OS/libs/coreinit/coreinit_IOS.h" #include "Cafe/OS/libs/coreinit/coreinit_Time.h" +#include #include #include @@ -102,7 +103,7 @@ namespace acp { // found the entry! -> update timestamp xml::XMLElement* timestamp = account->FirstChildElement("timestamp"); - sprintf(tmp, "%016llx", _acpGetTimestamp()); + sprintf(tmp, "%" PRIx64, _acpGetTimestamp()); if (timestamp) timestamp->SetText(tmp); else @@ -125,7 +126,7 @@ namespace acp tinyxml2::XMLElement* timestamp = doc.NewElement("timestamp"); { - sprintf(tmp, "%016llx", _acpGetTimestamp()); + sprintf(tmp, "%" PRIx64, _acpGetTimestamp()); timestamp->SetText(tmp); } @@ -506,4 +507,4 @@ namespace acp osLib_addFunction("nn_acp", "ACPConvertNetworkTimeToOSCalendarTime", export_ACPConvertNetworkTimeToOSCalendarTime); } } -} \ No newline at end of file +} diff --git a/src/Cafe/TitleList/TitleInfo.cpp b/src/Cafe/TitleList/TitleInfo.cpp index ec0ed7e5..a3d6aaf9 100644 --- a/src/Cafe/TitleList/TitleInfo.cpp +++ b/src/Cafe/TitleList/TitleInfo.cpp @@ -645,10 +645,10 @@ std::string TitleInfo::GetInstallPath() const { TitleId titleId = GetAppTitleId(); TitleIdParser tip(titleId); - std::string tmp; + std::string tmp; if (tip.IsSystemTitle()) - tmp = fmt::format("sys\\title\\{:08x}\\{:08x}", GetTitleIdHigh(titleId), GetTitleIdLow(titleId)); - else - tmp = fmt::format("usr\\title\\{:08x}\\{:08x}", GetTitleIdHigh(titleId), GetTitleIdLow(titleId)); + tmp = fmt::format("sys/title/{:08x}/{:08x}", GetTitleIdHigh(titleId), GetTitleIdLow(titleId)); + else + tmp = fmt::format("usr/title/{:08x}/{:08x}", GetTitleIdHigh(titleId), GetTitleIdLow(titleId)); return tmp; -} \ No newline at end of file +} diff --git a/src/Cemu/Tools/DownloadManager/DownloadManager.cpp b/src/Cemu/Tools/DownloadManager/DownloadManager.cpp index 8a0aa895..edaa2e00 100644 --- a/src/Cemu/Tools/DownloadManager/DownloadManager.cpp +++ b/src/Cemu/Tools/DownloadManager/DownloadManager.cpp @@ -15,6 +15,7 @@ #include "Cafe/Filesystem/FST/FST.h" #include "Cafe/TitleList/TitleList.h" +#include #include #include #include @@ -580,7 +581,7 @@ void DownloadManager::searchForIncompleteDownloads() uint64 titleId; uint32 version; std::string name = p.path().filename().generic_string(); - if( sscanf(name.c_str(), "cemu_%016llx_v%u", &titleId, &version) != 2) + if( sscanf(name.c_str(), "cemu_% " PRIx64 "_v%u", &titleId, &version) != 2) continue; std::unique_lock _l(m_mutex); for (auto& itr : m_ticketCache) diff --git a/src/Common/precompiled.cpp b/src/Common/precompiled.cpp index c08ca1f1..5f656a45 100644 --- a/src/Common/precompiled.cpp +++ b/src/Common/precompiled.cpp @@ -1 +1 @@ -#include "precompiled.h" \ No newline at end of file +#include "precompiled.h" diff --git a/src/Common/precompiled.h b/src/Common/precompiled.h index 8e7da689..1d00311f 100644 --- a/src/Common/precompiled.h +++ b/src/Common/precompiled.h @@ -225,16 +225,19 @@ typedef union _LARGE_INTEGER { #define DEBUG_BREAK __debugbreak() #define ALIGN(N) __declspec(align(N)) #define NOINLINE __declspec(noinline) - #define ASSUME(X) __assume((X) + #define ASSUME(X) __assume(X) #define THREAD_LOCAL __declspec(thread) #define POPCNT(X) __popcnt((X)) #else #define DLLEXPORT #define DLLIMPORT - #define DEBUG_BREAK + // fixme: random stack overflow solution. use with caution + #include + #define DEBUG_BREAK raise(SIGTRAP) #define ALIGN(N) __attribute__((aligned (N))) #define NOINLINE __attribute__((noinline)) - #define ASSUME(X) + // fixme: random stack overflow solution. use it with caution + #define ASSUME(X) do { if (!(X)) __builtin_unreachable(); } while (0) #define THREAD_LOCAL __thread #define POPCNT(X) __builtin_popcount((X)) #endif diff --git a/src/gui/GraphicPacksWindow2.cpp b/src/gui/GraphicPacksWindow2.cpp index f46d8abe..a830cb72 100644 --- a/src/gui/GraphicPacksWindow2.cpp +++ b/src/gui/GraphicPacksWindow2.cpp @@ -421,6 +421,10 @@ void GraphicPacksWindow2::OnTreeSelectionChanged(wxTreeEvent& event) { wxWindowUpdateLocker lock(this); + bool item_deselected = m_graphic_pack_tree->GetSelection() == m_graphic_pack_tree->GetRootItem(); + if (item_deselected) + return; + const auto selection = m_graphic_pack_tree->GetSelection(); if (selection.IsOk()) { diff --git a/src/gui/MemorySearcherTool.cpp b/src/gui/MemorySearcherTool.cpp index 9fd55dcd..f86bf462 100644 --- a/src/gui/MemorySearcherTool.cpp +++ b/src/gui/MemorySearcherTool.cpp @@ -400,7 +400,7 @@ void MemorySearcherTool::OnResultListClick(wxMouseEvent& event) auto currValue = m_listResults->GetItemText(selectedIndex, 1); char addressString[256]; - sprintf(addressString, "0x%08x", address); + sprintf(addressString, "0x%08lx", address); // description, address, type, value, freeze wxVector data; diff --git a/src/gui/windows/PPCThreadsViewer/DebugPPCThreadsWindow.cpp b/src/gui/windows/PPCThreadsViewer/DebugPPCThreadsWindow.cpp index cd509a52..93eaa596 100644 --- a/src/gui/windows/PPCThreadsViewer/DebugPPCThreadsWindow.cpp +++ b/src/gui/windows/PPCThreadsViewer/DebugPPCThreadsWindow.cpp @@ -5,6 +5,8 @@ #include "Cafe/OS/RPL/rpl.h" #include "Cafe/OS/RPL/rpl_symbol_storage.h" +#include + enum { // options @@ -233,11 +235,11 @@ void DebugPPCThreadsWindow::RefreshThreadList() m_thread_list->SetItem(i, 7, tempStr); // last awake in cycles uint64 lastWakeUpTime = cafeThread->wakeUpTime; - sprintf(tempStr, "%I64u", lastWakeUpTime); + sprintf(tempStr, "%" PRIu64, lastWakeUpTime); m_thread_list->SetItem(i, 8, tempStr); // awake time in cycles uint64 awakeTime = cafeThread->totalCycles; - sprintf(tempStr, "%I64u", awakeTime); + sprintf(tempStr, "%" PRIu64, awakeTime); m_thread_list->SetItem(i, 9, tempStr); // thread name const char* threadName = "NULL"; diff --git a/src/util/Zir/Core/IR.cpp b/src/util/Zir/Core/IR.cpp index 5fdfba61..9e1e3e8b 100644 --- a/src/util/Zir/Core/IR.cpp +++ b/src/util/Zir/Core/IR.cpp @@ -1,6 +1,8 @@ #include "util/Zir/Core/IR.h" #include "util/Zir/Core/ZpIRDebug.h" +#include + namespace ZpIR { @@ -201,15 +203,15 @@ namespace ZpIR void DebugPrinter::debugPrintBlock(ZpIRBasicBlock* block) { // print name - printf("IRBasicBlock %016llx\n", (uintptr_t)block); + printf("IRBasicBlock %" PRIxPTR "\n", (uintptr_t)block); // print imports printf("Imports:\n"); for(auto itr : block->m_imports) - printf(" reg: %s sym:0x%llx\n", getRegisterName(block, itr.reg).c_str(), itr.name); + printf(" reg: %s sym:0x%lux\n", getRegisterName(block, itr.reg).c_str(), itr.name); // print exports printf("Exports:\n"); for (auto itr : block->m_exports) - printf(" reg: %s sym:0x%llx\n", getRegisterName(block, itr.reg).c_str(), itr.name); + printf(" reg: %s sym:0x%lux\n", getRegisterName(block, itr.reg).c_str(), itr.name); // print instructions printf("Assembly:\n"); IR::__InsBase* instruction = block->m_instructionFirst; @@ -233,4 +235,4 @@ namespace ZpIR } } -} \ No newline at end of file +}