[HID] Implement some extra service calls. [CFG] Add language checking.

This commit is contained in:
wheremyfoodat 2022-10-11 23:32:40 +03:00
parent 2a4709dcfa
commit d395fcd3cc
6 changed files with 86 additions and 6 deletions

View file

@ -10,6 +10,7 @@ class CFGService {
// Service functions
void getConfigInfoBlk2(u32 messagePointer);
void secureInfoGetRegion(u32 messagePointer);
public:
CFGService(Memory& mem) : mem(mem) {}

View file

@ -9,9 +9,14 @@ class HIDService {
Memory& mem;
u8* sharedMem = nullptr; // Pointer to HID shared memory
bool accelerometerEnabled;
bool gyroEnabled;
MAKE_LOG_FUNCTION(log, hidLogger)
// Service commands
void enableAccelerometer(u32 messagePointer);
void enableGyroscopeLow(u32 messagePointer);
void getIPCHandles(u32 messagePointer);
public:

View file

@ -0,0 +1,42 @@
#pragma once
#include "helpers.hpp"
// Used for CFG::SecureInfoGetRegion
enum class Regions : u32 {
Japan = 0,
USA = 1,
Europe = 2,
Australia = 3,
China = 4,
Korea = 5,
Taiwan = 6
};
// Used for the language field in the NAND user data
enum class LanguageCodes : u32 {
JP = 0,
EN = 1,
FR = 2,
DE = 3,
IT = 4,
ES = 5,
ZH = 6,
KO = 7,
NL = 8,
PT = 9,
RU = 10,
TW = 11,
Japanese = JP,
English = EN,
French = FR,
German = DE,
Italian = IT,
Spanish = ES,
Chinese = ZH,
Korean = KO,
Dutch = NL,
Portuguese = PT,
Russian = RU,
Taiwanese = TW
};