mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-23 03:29:45 +00:00
Minor clean up + upstream changes form GUI
This commit is contained in:
parent
738b237453
commit
a945036c67
@ -176,7 +176,7 @@ int main(int argc, char *argv[])
|
|||||||
getSizeString(ctrTotalSize, getTotalStorage(SYSTEM_MEDIATYPE_CTR_NAND));
|
getSizeString(ctrTotalSize, getTotalStorage(SYSTEM_MEDIATYPE_CTR_NAND));
|
||||||
printf("\x1b[32;1m*\x1b[0m CTR Size: \x1b[32;1m%s\x1b[0m / \x1b[32;1m%s\x1b[0m \n", ctrFreeSize, ctrTotalSize);
|
printf("\x1b[32;1m*\x1b[0m CTR Size: \x1b[32;1m%s\x1b[0m / \x1b[32;1m%s\x1b[0m \n", ctrFreeSize, ctrTotalSize);
|
||||||
|
|
||||||
printf("\x1b[32;1m*\x1b[0m Installed titles: SD: \x1b[32;1m%i\x1b[0m (NAND: \x1b[32;1m%i\x1b[0m)\n", (int)titleCount(MEDIATYPE_SD), (int)titleCount(MEDIATYPE_NAND));
|
printf("\x1b[32;1m*\x1b[0m Installed titles: SD: \x1b[32;1m%lu\x1b[0m (NAND: \x1b[32;1m%lu\x1b[0m)\n", titleCount(MEDIATYPE_SD), titleCount(MEDIATYPE_NAND));
|
||||||
|
|
||||||
while (aptMainLoop())
|
while (aptMainLoop())
|
||||||
{
|
{
|
||||||
|
@ -60,12 +60,12 @@ void actExit(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ACTU_Initialize(u32 sdkVer, void *addr, u32 memSize)
|
Result ACTU_Initialize(u32 sdkVer, void * addr, u32 memSize)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
cmdbuf[0] = IPC_MakeHeader(0x1,2,4); // 0x00010084
|
cmdbuf[0] = IPC_MakeHeader(0x1, 2, 4); // 0x00010084
|
||||||
cmdbuf[1] = sdkVer;
|
cmdbuf[1] = sdkVer;
|
||||||
cmdbuf[2] = memSize;
|
cmdbuf[2] = memSize;
|
||||||
cmdbuf[3] = 0x20;
|
cmdbuf[3] = 0x20;
|
||||||
@ -79,12 +79,12 @@ Result ACTU_Initialize(u32 sdkVer, void *addr, u32 memSize)
|
|||||||
return (Result)cmdbuf[1];
|
return (Result)cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ACTU_GetAccountDataBlock(void *buffer, u32 size, u32 blkId)
|
Result ACTU_GetAccountDataBlock(void * buffer, u32 size, u32 blkId)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
cmdbuf[0] = IPC_MakeHeader(6,3,2); // 0x00600C2
|
cmdbuf[0] = IPC_MakeHeader(6, 3, 2); // 0x00600C2
|
||||||
cmdbuf[1] = 0xFE;
|
cmdbuf[1] = 0xFE;
|
||||||
cmdbuf[2] = size;
|
cmdbuf[2] = size;
|
||||||
cmdbuf[3] = blkId;
|
cmdbuf[3] = blkId;
|
||||||
|
@ -7,7 +7,7 @@ Result amNetGetDeviceCert(u8 const * buffer)
|
|||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
cmdbuf[0] = IPC_MakeHeader(0x818,1,2); // 0x08180042
|
cmdbuf[0] = IPC_MakeHeader(0x818, 1, 2); // 0x08180042
|
||||||
cmdbuf[1] = 0x180;
|
cmdbuf[1] = 0x180;
|
||||||
cmdbuf[2] = (0x180 << 4) | 0xC;
|
cmdbuf[2] = (0x180 << 4) | 0xC;
|
||||||
cmdbuf[3] = (u32)buffer;
|
cmdbuf[3] = (u32)buffer;
|
||||||
|
@ -12,12 +12,12 @@ Result cfgsExit()
|
|||||||
return svcCloseHandle(cfgHandle);
|
return svcCloseHandle(cfgHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result CFG_GetConfig(u32 size, u32 blkID, u8* outData)
|
Result CFG_GetConfig(u32 size, u32 blkID, u8 * outData)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
cmdbuf[0] = IPC_MakeHeader(0x1,2,2); // 0x10082
|
cmdbuf[0] = IPC_MakeHeader(0x1, 2, 2); // 0x10082
|
||||||
cmdbuf[1] = size;
|
cmdbuf[1] = size;
|
||||||
cmdbuf[2] = blkID;
|
cmdbuf[2] = blkID;
|
||||||
cmdbuf[3] = IPC_Desc_Buffer(size,IPC_BUFFER_W);
|
cmdbuf[3] = IPC_Desc_Buffer(size,IPC_BUFFER_W);
|
||||||
@ -29,12 +29,12 @@ Result CFG_GetConfig(u32 size, u32 blkID, u8* outData)
|
|||||||
return (Result)cmdbuf[1];
|
return (Result)cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result cfgsSecureInfoGetSerialNo(char *serial)
|
Result cfgsSecureInfoGetSerialNo(char * serial)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
cmdbuf[0] = IPC_MakeHeader(0x408,1,2); // 0x10082
|
cmdbuf[0] = IPC_MakeHeader(0x408, 1, 2); // 0x10082
|
||||||
cmdbuf[1] = 0xF;
|
cmdbuf[1] = 0xF;
|
||||||
cmdbuf[2] = 12 | (0xF << 4);
|
cmdbuf[2] = 12 | (0xF << 4);
|
||||||
cmdbuf[3] = (u32)serial;
|
cmdbuf[3] = (u32)serial;
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
#include "gsplcd.h"
|
#include "gsplcd.h"
|
||||||
|
|
||||||
static Handle gspLcdHandle;
|
Handle gspLcdHandle;
|
||||||
|
|
||||||
Result GSPLCD_GetBrightness(u32 screen, u32 *brightness)
|
Result GSPLCD_GetBrightness(u32 screen, u32 * brightness)
|
||||||
{
|
{
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
cmdbuf[0] = IPC_MakeHeader(0x15,1,0); // 0x150040
|
cmdbuf[0] = IPC_MakeHeader(0x15, 1, 0); // 0x150040
|
||||||
cmdbuf[1] = screen;
|
cmdbuf[1] = screen;
|
||||||
|
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle)))
|
||||||
|
return ret;
|
||||||
|
|
||||||
*brightness = cmdbuf[2];
|
*brightness = cmdbuf[2];
|
||||||
|
|
||||||
return cmdbuf[2];
|
return cmdbuf[2];
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user