mirror of
https://github.com/wiiu-env/AutobootModule.git
synced 2024-11-22 02:49:16 +01:00
Remove includes which are now in wut
This commit is contained in:
parent
46ff1052ee
commit
772fd0130d
@ -1,28 +0,0 @@
|
||||
#pragma once
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum ScreenType {
|
||||
SCREEN_TYPE_TV = 1,
|
||||
SCREEN_TYPE_DRC,
|
||||
SCREEN_TYPE_BOTH,
|
||||
} ScreenType;
|
||||
|
||||
int32_t
|
||||
CMPTGetDataSize(uint32_t* outSize);
|
||||
|
||||
int32_t
|
||||
CMPTLaunchTitle(void* dataBuffer, uint32_t bufferSize, uint32_t titleId_low, uint32_t titleId_high);
|
||||
|
||||
int32_t
|
||||
CMPTAcctSetScreenType(ScreenType type);
|
||||
|
||||
int32_t
|
||||
CMPTCheckScreenState(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1,28 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <coreinit/filesystem.h>
|
||||
#include "common.h"
|
||||
|
||||
namespace nn::sl {
|
||||
class FileStream {
|
||||
public:
|
||||
FileStream() {
|
||||
instance = __ct__Q3_2nn2sl10FileStreamFv(nullptr);
|
||||
}
|
||||
|
||||
~FileStream() {
|
||||
if (instance != nullptr) {
|
||||
__dt__Q3_2nn2sl10FileStreamFv(instance);
|
||||
}
|
||||
}
|
||||
|
||||
nn::Result Initialize(FSClient *client, FSCmdBlock *cmdBlock, char const *path, char const *mode) {
|
||||
return Initialize__Q3_2nn2sl10FileStreamFP8FSClientP10FSCmdBlockPCcT3(this->instance, client, cmdBlock, path, mode);
|
||||
}
|
||||
|
||||
FileStreamInternal *instance = nullptr;
|
||||
};
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include "common.h"
|
||||
#include "FileStream.h"
|
||||
|
||||
namespace nn::sl {
|
||||
class LaunchInfoDatabase {
|
||||
public:
|
||||
LaunchInfoDatabase() {
|
||||
instance = __ct__Q3_2nn2sl18LaunchInfoDatabaseFv(nullptr);
|
||||
}
|
||||
|
||||
~LaunchInfoDatabase() {
|
||||
Finalize__Q3_2nn2sl18LaunchInfoDatabaseFv(instance);
|
||||
}
|
||||
|
||||
// nn::sl::LaunchInfoDatabase::Load(nn::sl::IStream &, nn::sl::Region)
|
||||
nn::Result Load(nn::sl::FileStream *fileStream, nn::sl::Region region) {
|
||||
return Load__Q3_2nn2sl18LaunchInfoDatabaseFRQ3_2nn2sl7IStreamQ3_2nn2sl6Region(instance, fileStream->instance, region);
|
||||
}
|
||||
|
||||
// nn::sl::LaunchInfoDatabase::GetLaunchInfoById(nn::sl::LaunchInfo *, unsigned long long) const
|
||||
nn::Result GetLaunchInfoById(nn::sl::LaunchInfo *launchInfo, uint64_t titleId) {
|
||||
return GetLaunchInfoById__Q3_2nn2sl18LaunchInfoDatabaseCFPQ3_2nn2sl10LaunchInfoUL(instance, launchInfo, titleId);
|
||||
}
|
||||
|
||||
private:
|
||||
LaunchInfoDatabaseInternal *instance;
|
||||
};
|
||||
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <coreinit/filesystem.h>
|
||||
#include <coreinit/memdefaultheap.h>
|
||||
|
||||
namespace nn::sl {
|
||||
typedef struct WUT_PACKED FileStreamInternal {
|
||||
WUT_UNKNOWN_BYTES(0x10);
|
||||
} FileStreamInternal;
|
||||
WUT_CHECK_SIZE(FileStreamInternal, 0x10);
|
||||
|
||||
extern "C" nn::Result Initialize__Q3_2nn2sl10FileStreamFP8FSClientP10FSCmdBlockPCcT3(FileStreamInternal *, FSClient *, FSCmdBlock *, char const *, char const *);
|
||||
extern "C" FileStreamInternal *__ct__Q3_2nn2sl10FileStreamFv(FileStreamInternal *);
|
||||
extern "C" void __dt__Q3_2nn2sl10FileStreamFv(FileStreamInternal *);
|
||||
|
||||
typedef struct WUT_PACKED LaunchInfo {
|
||||
uint64_t titleId;
|
||||
WUT_UNKNOWN_BYTES(0x810 - 0x08);
|
||||
} LaunchInfo;
|
||||
|
||||
WUT_CHECK_OFFSET(LaunchInfo, 0x00, titleId);
|
||||
WUT_CHECK_SIZE(LaunchInfo, 0x810);
|
||||
|
||||
void
|
||||
GetDefaultDatabasePath(char *, int size, uint32_t tid_hi, uint32_t tid_low)
|
||||
asm("GetDefaultDatabasePath__Q2_2nn2slFPcUiUL");
|
||||
|
||||
nn::Result
|
||||
Initialize(MEMAllocFromDefaultHeapExFn, MEMFreeToDefaultHeapFn)
|
||||
asm("Initialize__Q2_2nn2slFPFUiT1_PvPFPv_v");
|
||||
|
||||
nn::Result
|
||||
Finalize()
|
||||
asm("Finalize__Q2_2nn2slFv");
|
||||
|
||||
typedef enum Region {
|
||||
REGION_JPN = 0,
|
||||
REGION_USA = 1,
|
||||
REGION_EUR = 2
|
||||
} Region;
|
||||
|
||||
typedef struct WUT_PACKED LaunchInfoDatabaseInternal {
|
||||
WUT_UNKNOWN_BYTES(0x1C);
|
||||
} LaunchInfoDatabaseInternal;
|
||||
WUT_CHECK_SIZE(LaunchInfoDatabaseInternal, 0x1C);
|
||||
|
||||
extern "C" LaunchInfoDatabaseInternal *__ct__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" nn::Result Load__Q3_2nn2sl18LaunchInfoDatabaseFRQ3_2nn2sl7IStreamQ3_2nn2sl6Region(LaunchInfoDatabaseInternal *, nn::sl::FileStreamInternal *, nn::sl::Region);
|
||||
extern "C" void Finalize__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" nn::Result GetLaunchInfoById__Q3_2nn2sl18LaunchInfoDatabaseCFPQ3_2nn2sl10LaunchInfoUL(LaunchInfoDatabaseInternal *, nn::sl::LaunchInfo *, uint64_t titleId);
|
||||
}
|
||||
|
@ -11,11 +11,9 @@
|
||||
#include <padscore/kpad.h>
|
||||
#include <nn/acp.h>
|
||||
#include <nn/act.h>
|
||||
#include <nn/cmpt/cmpt.h>
|
||||
#include <nn/cmpt.h>
|
||||
#include <nn/ccr/sys_caffeine.h>
|
||||
#include <nn/sl/common.h>
|
||||
#include <nn/sl/FileStream.h>
|
||||
#include <nn/sl/LaunchInfoDatabase.h>
|
||||
#include <nn/sl.h>
|
||||
#include <nn/spm.h>
|
||||
|
||||
#include <whb/log_module.h>
|
||||
@ -93,7 +91,7 @@ bool getQuickBoot() {
|
||||
if (bootCheck == 0) {
|
||||
nn::sl::Initialize(MEMAllocFromDefaultHeapEx, MEMFreeToDefaultHeap);
|
||||
char path[0x80];
|
||||
nn::sl::GetDefaultDatabasePath(path, 0x80, 0x00050010, 0x10066000); // ECO process
|
||||
nn::sl::GetDefaultDatabasePath(path, 0x80, 0x0005001010066000); // ECO process
|
||||
FSCmdBlock cmdBlock;
|
||||
FSInitCmdBlock(&cmdBlock);
|
||||
|
||||
@ -227,11 +225,11 @@ static void launchvWiiTitle(uint32_t titleId_low, uint32_t titleId_high){
|
||||
KPADInit();
|
||||
|
||||
// Try to find a screen type that works
|
||||
CMPTAcctSetScreenType(SCREEN_TYPE_BOTH);
|
||||
CMPTAcctSetScreenType(CMPT_SCREEN_TYPE_BOTH);
|
||||
if (CMPTCheckScreenState() < 0) {
|
||||
CMPTAcctSetScreenType(SCREEN_TYPE_DRC);
|
||||
CMPTAcctSetScreenType(CMPT_SCREEN_TYPE_DRC);
|
||||
if (CMPTCheckScreenState() < 0) {
|
||||
CMPTAcctSetScreenType(SCREEN_TYPE_TV);
|
||||
CMPTAcctSetScreenType(CMPT_SCREEN_TYPE_TV);
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,7 +270,7 @@ int handleMenuScreen(void){
|
||||
bool redraw = true;
|
||||
while (true) {
|
||||
VPADStatus vpad{};
|
||||
VPADRead(VPAD_CHAN_0, &vpad, 1, NULL);
|
||||
VPADRead(VPAD_CHAN_0, &vpad, 1, nullptr);
|
||||
|
||||
if (vpad.trigger & VPAD_BUTTON_UP) {
|
||||
if (selected > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user