mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-03 21:41:19 +12:00
Initial support for title switching + better Wii U menu compatibility (#907)
This commit is contained in:
parent
bfbeeae6f6
commit
2200cc0ddf
95 changed files with 2549 additions and 746 deletions
|
@ -8,11 +8,9 @@
|
|||
#include "openssl/x509.h"
|
||||
#include "openssl/ssl.h"
|
||||
#include "util/helpers/helpers.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "Cemu/napi/napi.h"
|
||||
#include "Cemu/ncrypto/ncrypto.h"
|
||||
#include "Cafe/CafeSystem.h"
|
||||
|
||||
namespace iosu
|
||||
{
|
||||
|
@ -47,6 +45,13 @@ namespace iosu
|
|||
bool backgroundThreadStarted;
|
||||
} g_nim = {};
|
||||
|
||||
bool nim_CheckDownloadsDisabled()
|
||||
{
|
||||
// currently for the Wii U menu we disable NIM to speed up boot times
|
||||
uint64 tid = CafeSystem::GetForegroundTitleId();
|
||||
return tid == 0x0005001010040000 || tid == 0x0005001010040100 || tid == 0x0005001010040200;
|
||||
}
|
||||
|
||||
bool nim_getLatestVersion()
|
||||
{
|
||||
g_nim.latestVersion = -1;
|
||||
|
@ -101,6 +106,13 @@ namespace iosu
|
|||
|
||||
void nim_buildDownloadList()
|
||||
{
|
||||
if(nim_CheckDownloadsDisabled())
|
||||
{
|
||||
cemuLog_logDebug(LogType::Force, "nim_buildDownloadList: Downloads are disabled for this title");
|
||||
g_nim.packages.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
sint32 titleCount = mcpGetTitleCount();
|
||||
MCPTitleInfo* titleList = (MCPTitleInfo*)malloc(titleCount * sizeof(MCPTitleInfo));
|
||||
memset(titleList, 0, titleCount * sizeof(MCPTitleInfo));
|
||||
|
@ -141,6 +153,8 @@ namespace iosu
|
|||
void nim_getPackagesInfo(uint64* titleIdList, sint32 count, titlePackageInfo_t* packageInfoList)
|
||||
{
|
||||
memset(packageInfoList, 0, sizeof(titlePackageInfo_t)*count);
|
||||
if(nim_CheckDownloadsDisabled())
|
||||
return;
|
||||
for (sint32 i = 0; i < count; i++)
|
||||
{
|
||||
uint64 titleId = _swapEndianU64(titleIdList[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue