2016-07-20 19:42:47 +00:00
|
|
|
#include <3ds.h>
|
|
|
|
|
2017-09-15 16:16:13 +00:00
|
|
|
#include <malloc.h>
|
|
|
|
|
|
|
|
#include "ac.h"
|
2016-07-28 19:32:39 +00:00
|
|
|
#include "actu.h"
|
2017-07-15 06:00:34 +00:00
|
|
|
#include "fs.h"
|
2017-09-15 16:16:13 +00:00
|
|
|
#include "hardware.h"
|
2017-07-17 06:57:18 +00:00
|
|
|
#include "kernel.h"
|
2016-09-23 05:24:14 +00:00
|
|
|
#include "mcu.h"
|
2017-06-02 19:27:47 +00:00
|
|
|
#include "misc.h"
|
|
|
|
#include "power.h"
|
2017-01-19 16:30:20 +00:00
|
|
|
#include "screenshot.h"
|
2017-09-15 16:16:13 +00:00
|
|
|
#include "storage.h"
|
2017-06-02 19:27:47 +00:00
|
|
|
#include "system.h"
|
2016-11-28 07:45:57 +00:00
|
|
|
#include "utils.h"
|
2016-07-27 08:28:48 +00:00
|
|
|
|
2017-07-15 06:00:34 +00:00
|
|
|
#define SDK(a, b, c, d) ((a<<24) | (b<<16) | (c<<8) | d)
|
2016-10-12 16:11:01 +00:00
|
|
|
|
2017-02-19 03:00:55 +00:00
|
|
|
void initServices()
|
2016-10-29 17:04:46 +00:00
|
|
|
{
|
|
|
|
gfxInitDefault();
|
|
|
|
cfguInit();
|
|
|
|
ptmuInit();
|
2016-09-23 05:24:14 +00:00
|
|
|
mcuInit();
|
2016-08-24 14:44:20 +00:00
|
|
|
amInit();
|
2016-11-28 07:45:57 +00:00
|
|
|
amAppInit();
|
2016-09-05 00:19:32 +00:00
|
|
|
aptInit();
|
2016-10-29 17:04:46 +00:00
|
|
|
hidInit();
|
2017-12-12 06:40:06 +00:00
|
|
|
aciInit();
|
2017-09-15 16:16:13 +00:00
|
|
|
actInit();
|
2017-07-16 07:35:22 +00:00
|
|
|
socInit((u32*)memalign(0x1000, 0x10000), 0x10000);
|
2017-09-15 16:16:13 +00:00
|
|
|
|
|
|
|
fsInit();
|
|
|
|
sdmcInit();
|
|
|
|
openArchive(&fsArchive, ARCHIVE_SDMC);
|
|
|
|
|
|
|
|
if (isN3DS())
|
|
|
|
osSetSpeedupEnable(true);
|
2017-02-19 03:00:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void termServices()
|
|
|
|
{
|
2017-09-15 16:16:13 +00:00
|
|
|
if (isN3DS())
|
|
|
|
osSetSpeedupEnable(false);
|
|
|
|
|
|
|
|
closeArchive(fsArchive);
|
|
|
|
sdmcExit();
|
|
|
|
fsExit();
|
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
socExit();
|
2017-02-19 03:00:55 +00:00
|
|
|
actExit();
|
|
|
|
hidExit();
|
|
|
|
aptExit();
|
|
|
|
acExit();
|
2017-12-12 06:40:06 +00:00
|
|
|
aciExit();
|
2017-02-19 03:00:55 +00:00
|
|
|
amExit();
|
|
|
|
mcuExit();
|
|
|
|
ptmuExit();
|
|
|
|
cfguExit();
|
|
|
|
gfxExit();
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
initServices();
|
2017-01-19 16:30:20 +00:00
|
|
|
|
2016-11-06 00:51:42 +00:00
|
|
|
//=====================================================================//
|
|
|
|
//------------------------Variable Declaration-------------------------//
|
|
|
|
//=====================================================================//
|
|
|
|
|
2016-10-31 03:33:17 +00:00
|
|
|
double wifiPercent, volPercent, _3dSliderPercent;
|
2017-08-02 17:00:11 +00:00
|
|
|
unsigned long long homemenuID = 0;
|
2017-07-17 06:57:18 +00:00
|
|
|
u32 ip;
|
2017-08-02 17:00:11 +00:00
|
|
|
unsigned int principalID = 0;
|
2017-07-17 06:57:18 +00:00
|
|
|
u8 batteryPercent = 0, batteryVolt = 0, volume = 0, mcuFwMajor = 0, mcuFwMinor = 0;
|
2017-07-16 07:35:22 +00:00
|
|
|
bool isConnected = false;
|
2017-09-15 16:16:13 +00:00
|
|
|
char sdFreeSize[16], sdTotalSize[16], ctrFreeSize[16], ctrTotalSize[16], country[0x3], name[0x16], nnid[0x11], timeZone[0x41];
|
2017-08-02 17:00:11 +00:00
|
|
|
AccountDataBlock accountDataBlock;
|
|
|
|
MiiData miiData;
|
2017-12-13 23:39:00 +00:00
|
|
|
bool displayInfo = true; // By default nothing is hidden.
|
|
|
|
|
|
|
|
hidScanInput();
|
|
|
|
u32 kHeld = hidKeysHeld();
|
|
|
|
|
|
|
|
if (kHeld & KEY_SELECT)
|
|
|
|
displayInfo = false; // Holding select on boot hides user specific details.
|
2017-07-16 07:35:22 +00:00
|
|
|
|
|
|
|
consoleInit(GFX_BOTTOM, NULL);
|
|
|
|
|
|
|
|
//=====================================================================//
|
|
|
|
//------------------------------MISC Info (continued)------------------//
|
|
|
|
//=====================================================================//
|
|
|
|
|
2017-07-21 03:26:55 +00:00
|
|
|
printf("\x1b[36;1m*\x1b[0m Installed titles: SD: \x1b[36;1m%lu\x1b[0m (NAND: \x1b[36;1m%lu\x1b[0m)\n", titleCount(MEDIATYPE_SD), titleCount(MEDIATYPE_NAND));
|
2017-07-16 07:35:22 +00:00
|
|
|
|
|
|
|
ip = gethostid();
|
2017-12-13 23:39:00 +00:00
|
|
|
|
|
|
|
if (displayInfo)
|
|
|
|
printf("\x1b[36;1m*\x1b[0m IP: \x1b[36;1m%lu.%lu.%lu.%lu\x1b[0m \n\n", ip & 0xFF, (ip>>8)&0xFF, (ip>>16)&0xFF, (ip>>24)&0xFF);
|
|
|
|
else
|
|
|
|
printf("\x1b[36;1m*\x1b[0m IP: \x1b[36;1m%s\x1b[0m \n\n", NULL);
|
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
//=====================================================================//
|
|
|
|
//------------------------------NNID Info------------------------------//
|
|
|
|
//=====================================================================//
|
|
|
|
|
|
|
|
ACTU_GetAccountDataBlock(&principalID, 0x4, 0xC); // First check if principal ID exists then display NNID info.
|
|
|
|
|
2017-08-02 17:00:11 +00:00
|
|
|
ACTU_GetAccountDataBlock((u8*)&accountDataBlock, 0xA0, 0x11);
|
|
|
|
ACTU_GetAccountDataBlock((u8*)&miiData, 0x60, 0x7);
|
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
if (principalID != 0)
|
|
|
|
{
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(ACTU_GetAccountDataBlock(nnid, 0x11, 0x8)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[35;1m*\x1b[0m NNID: \x1b[35;1m%s\x1b[0m\n", displayInfo? nnid : NULL);
|
2017-09-15 16:16:13 +00:00
|
|
|
|
|
|
|
u16_to_u8(name, accountDataBlock.miiName, 0x16);
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[35;1m*\x1b[0m Mii name: \x1b[35;1m%s\x1b[0m (\x1b[35;1m%u\x1b[0m)\n", displayInfo? name : NULL,
|
|
|
|
displayInfo? (unsigned int)miiData.miiID : 0);
|
2017-07-16 07:35:22 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[35;1m*\x1b[0m Principal ID: \x1b[35;1m%u\x1b[0m\n", displayInfo? principalID : 0);
|
2017-08-02 17:00:11 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[35;1m*\x1b[0m Persistent ID: \x1b[35;1m%u\x1b[0m\n", displayInfo? (unsigned int)accountDataBlock.persistentID : 0);
|
2017-08-02 17:00:11 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[35;1m*\x1b[0m Transferable ID: \x1b[35;1m%llu\x1b[0m\n", displayInfo? accountDataBlock.transferableID : 0);
|
2017-07-16 07:35:22 +00:00
|
|
|
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(ACTU_GetAccountDataBlock(country, 0x3, 0xB)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[35;1m*\x1b[0m Country: \x1b[35;1m%s\x1b[0m\n", displayInfo? country : NULL);
|
2017-07-16 07:35:22 +00:00
|
|
|
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(ACTU_GetAccountDataBlock(timeZone, 0x41, 0x1E)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[35;1m*\x1b[0m Time Zone: \x1b[35;1m%s\x1b[0m\n\n", displayInfo? timeZone : NULL);
|
2017-07-16 07:35:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//=====================================================================//
|
|
|
|
//------------------------------WIFI Info------------------------------//
|
|
|
|
//=====================================================================//
|
|
|
|
|
2017-12-12 06:40:06 +00:00
|
|
|
if (R_SUCCEEDED(ACI_LoadWiFiSlot(0)))
|
2017-07-16 07:35:22 +00:00
|
|
|
{
|
2017-12-12 06:40:06 +00:00
|
|
|
char ssid[0x20], passphrase[0x40];
|
2017-07-19 06:54:19 +00:00
|
|
|
|
2017-12-12 06:40:06 +00:00
|
|
|
if (R_SUCCEEDED(ACI_GetSSID(ssid)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 1 SSID: \x1b[32;1m%s\x1b[0m\n", displayInfo? ssid : NULL);
|
2017-12-12 06:40:06 +00:00
|
|
|
|
|
|
|
if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 1 pass: \x1b[32;1m%s\x1b[0m\n", displayInfo? passphrase : NULL);
|
2017-12-12 07:08:37 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 1 security: \x1b[32;1m%s\x1b[0m\n\n", displayInfo? getSecurityMode() : NULL);
|
2017-07-16 07:35:22 +00:00
|
|
|
}
|
|
|
|
|
2017-12-12 06:40:06 +00:00
|
|
|
if (R_SUCCEEDED(ACI_LoadWiFiSlot(1)))
|
2017-07-16 07:35:22 +00:00
|
|
|
{
|
2017-12-12 06:40:06 +00:00
|
|
|
char ssid[0x20], passphrase[0x40];
|
2017-07-19 06:54:19 +00:00
|
|
|
|
2017-12-12 06:40:06 +00:00
|
|
|
if (R_SUCCEEDED(ACI_GetSSID(ssid)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 2 SSID: \x1b[32;1m%s\x1b[0m\n", displayInfo? ssid : NULL);
|
2017-12-12 06:40:06 +00:00
|
|
|
|
|
|
|
if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 2 pass: \x1b[32;1m%s\x1b[0m\n", displayInfo? passphrase : NULL);
|
2017-12-12 07:08:37 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 2 security: \x1b[32;1m%s\x1b[0m\n\n", displayInfo? getSecurityMode() : NULL);
|
2017-07-16 07:35:22 +00:00
|
|
|
}
|
|
|
|
|
2017-12-12 06:40:06 +00:00
|
|
|
if (R_SUCCEEDED(ACI_LoadWiFiSlot(2)))
|
2017-07-16 07:35:22 +00:00
|
|
|
{
|
2017-12-12 06:40:06 +00:00
|
|
|
char ssid[0x20], passphrase[0x40];
|
2017-07-19 06:54:19 +00:00
|
|
|
|
2017-12-12 06:40:06 +00:00
|
|
|
if (R_SUCCEEDED(ACI_GetSSID(ssid)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 3 SSID: \x1b[32;1m%s\x1b[0m\n", displayInfo? ssid : NULL);
|
2017-12-12 06:40:06 +00:00
|
|
|
|
|
|
|
if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 3 pass: \x1b[32;1m%s\x1b[0m\n", displayInfo? passphrase : NULL);
|
2017-12-12 07:08:37 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[32;1m*\x1b[0m WiFi 3 security: \x1b[32;1m%s\x1b[0m\n\n", displayInfo? getSecurityMode() : NULL);
|
2017-07-16 07:35:22 +00:00
|
|
|
}
|
|
|
|
|
2017-07-17 06:57:18 +00:00
|
|
|
printf("\x1b[32;1m> Press any key to exit =)\x1b[0m");
|
2017-07-16 07:35:22 +00:00
|
|
|
|
|
|
|
consoleInit(GFX_TOP, NULL);
|
2016-10-29 17:04:46 +00:00
|
|
|
|
2017-07-15 06:00:34 +00:00
|
|
|
printf("\x1b[1;1H"); //Move the cursor to the top left corner of the screen
|
2017-12-17 17:17:10 +00:00
|
|
|
printf("\x1b[32;1m3DSident 0.7.9\x1b[0m\n\n");
|
2017-02-19 03:00:55 +00:00
|
|
|
|
|
|
|
//=====================================================================//
|
|
|
|
//------------------------------Firm Info------------------------------//
|
|
|
|
//=====================================================================//
|
2017-07-17 06:57:18 +00:00
|
|
|
|
|
|
|
printf("\x1b[33;1m*\x1b[0m Kernel version: \x1b[33;1m%s\n", getVersion(0));
|
|
|
|
|
|
|
|
printf("\x1b[33;1m*\x1b[0m Firm version: \x1b[33;1m%s\n", getVersion(1));
|
|
|
|
|
|
|
|
printf("\x1b[33;1m*\x1b[0m System version: \x1b[33;1m%s\n\n", getVersion(2));
|
2017-01-19 16:30:20 +00:00
|
|
|
|
2017-02-19 03:00:55 +00:00
|
|
|
//=====================================================================//
|
|
|
|
//-----------------------------System Info-----------------------------//
|
|
|
|
//=====================================================================//
|
|
|
|
|
2017-09-17 16:45:30 +00:00
|
|
|
printf("\x1b[31;1m*\x1b[0m Model: \x1b[31;1m%s\x1b[0m (\x1b[31;1m%s\x1b[0m - \x1b[31;1m%s\x1b[0m) \n\x1b[0m", getModel(), getRunningHW(), getRegion());
|
2017-06-02 19:27:47 +00:00
|
|
|
printf("\x1b[31;1m*\x1b[0m Screen type: \x1b[31;1m %s \n\x1b[0m", getScreenType());
|
2017-02-19 03:00:55 +00:00
|
|
|
printf("\x1b[31;1m*\x1b[0m Language: \x1b[31;1m%s\x1b[0m \n", getLang());
|
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[31;1m*\x1b[0m Device ID: \x1b[31;1m%lu \n", displayInfo? getDeviceId() : 0);
|
|
|
|
printf("\x1b[31;1m*\x1b[0m ECS Device ID: \x1b[31;1m%llu \n", displayInfo? getSoapId() : 0);
|
|
|
|
printf("\x1b[31;1m*\x1b[0m Local friend code seed: \x1b[31;1m%010llX\x1b[0m \n", displayInfo? getLocalFriendCodeSeed() : 0);
|
|
|
|
printf("\x1b[31;1m*\x1b[0m MAC Address: \x1b[31;1m%s\x1b[0m \n", displayInfo? getMacAddress() : 0);
|
|
|
|
printf("\x1b[31;1m*\x1b[0m Serial number: \x1b[31;1m%s\x1b[0m \n", displayInfo? getSerialNumber() : 0);
|
2017-02-19 03:00:55 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[31;1m*\x1b[0m SDMC CID: \x1b[31;1m%s\x1b[0m \n", displayInfo? getSdmcCid() : 0);
|
2017-02-19 03:00:55 +00:00
|
|
|
|
2017-12-13 23:39:00 +00:00
|
|
|
printf("\x1b[31;1m*\x1b[0m NAND CID: \x1b[31;1m%s\x1b[0m \n", displayInfo? getNandCid() : 0);
|
2017-02-19 03:00:55 +00:00
|
|
|
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(APT_GetAppletInfo(APPID_HOMEMENU, &homemenuID, NULL, NULL, NULL, NULL)))
|
|
|
|
printf("\x1b[31;1m*\x1b[0m Homemenu ID: \x1b[31;1m%016llX\x1b[0m \n\n", homemenuID);
|
2017-01-19 16:30:20 +00:00
|
|
|
|
2016-10-29 17:04:46 +00:00
|
|
|
while (aptMainLoop())
|
2016-10-12 16:11:01 +00:00
|
|
|
{
|
2016-11-06 00:51:42 +00:00
|
|
|
//=====================================================================//
|
|
|
|
//----------------------------Battery Info-----------------------------//
|
|
|
|
//=====================================================================//
|
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
printf("\x1b[19;0H");
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(MCU_GetBatteryLevel(&batteryPercent)))
|
|
|
|
printf("\x1b[34;1m*\x1b[0m Battery percentage: \x1b[34;1m%3d%%\x1b[0m (\x1b[34;1m%s\x1b[0m) \n", batteryPercent, batteryStatus());
|
2016-10-29 17:04:46 +00:00
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
printf("\x1b[20;0H");
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(MCU_GetBatteryVoltage(&batteryVolt)))
|
|
|
|
printf("\x1b[34;1m*\x1b[0m Battery voltage: \x1b[34;1m%d\x1b[0m (\x1b[34;1m%.1f V\x1b[0m) \n", batteryVolt, 5.0 * ((double)batteryVolt / 256.0));//,(Estimated: %0.1lf V) estimatedVolt);
|
2017-07-16 07:35:22 +00:00
|
|
|
|
|
|
|
printf("\x1b[21;0H");
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(PTMU_GetAdapterState(&isConnected)))
|
|
|
|
printf("\x1b[34;1m*\x1b[0m Adapter state: \x1b[34;1m%s\x1b[0m\n", isConnected? "connected " : "disconnected");
|
2017-07-16 07:35:22 +00:00
|
|
|
|
|
|
|
printf("\x1b[22;0H");
|
2017-09-15 16:16:13 +00:00
|
|
|
if ((R_SUCCEEDED(MCU_GetFwVerHigh(&mcuFwMajor))) && (R_SUCCEEDED(MCU_GetFwVerLow(&mcuFwMinor))))
|
|
|
|
printf("\x1b[34;1m*\x1b[0m MCU firmware: \x1b[34;1m%u.%u\x1b[0m\n\n", (mcuFwMajor - 16), mcuFwMinor);
|
2017-07-16 07:35:22 +00:00
|
|
|
|
2016-11-06 00:51:42 +00:00
|
|
|
//=====================================================================//
|
|
|
|
//------------------------------Misc Info------------------------------//
|
|
|
|
//=====================================================================//
|
2017-01-19 16:30:20 +00:00
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
printf("\x1b[24;0H");
|
|
|
|
getSizeString(sdFreeSize, getFreeStorage(SYSTEM_MEDIATYPE_SD));
|
|
|
|
getSizeString(sdTotalSize, getTotalStorage(SYSTEM_MEDIATYPE_SD));
|
|
|
|
printf("\x1b[36;1m*\x1b[0m SD Size: \x1b[36;1m%s\x1b[0m / \x1b[36;1m%s\x1b[0m \n", sdFreeSize, sdTotalSize);
|
|
|
|
|
|
|
|
printf("\x1b[25;0H");
|
|
|
|
getSizeString(ctrFreeSize, getFreeStorage(SYSTEM_MEDIATYPE_CTR_NAND));
|
|
|
|
getSizeString(ctrTotalSize, getTotalStorage(SYSTEM_MEDIATYPE_CTR_NAND));
|
|
|
|
printf("\x1b[36;1m*\x1b[0m CTR Size: \x1b[36;1m%s\x1b[0m / \x1b[36;1m%s\x1b[0m \n", ctrFreeSize, ctrTotalSize);
|
|
|
|
|
|
|
|
printf("\x1b[26;0H");
|
2017-12-17 07:06:35 +00:00
|
|
|
printf("\x1b[36;1m*\x1b[0m Brightness level: \x1b[36;1m%s\x1b[0m \n", getBrightness(GSPLCD_SCREEN_TOP));
|
2017-07-16 07:35:22 +00:00
|
|
|
|
|
|
|
printf("\x1b[27;0H");
|
2016-10-29 17:04:46 +00:00
|
|
|
wifiPercent = (osGetWifiStrength() * 33.3333333333);
|
2017-07-16 07:35:22 +00:00
|
|
|
printf("\x1b[36;1m*\x1b[0m WiFi signal strength: \x1b[36;1m%d\x1b[0m (\x1b[36;1m%.0lf%%\x1b[0m) \n", osGetWifiStrength(), wifiPercent);
|
2016-10-29 17:04:46 +00:00
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
printf("\x1b[28;0H");
|
2017-09-15 16:16:13 +00:00
|
|
|
if (R_SUCCEEDED(HIDUSER_GetSoundVolume(&volume)))
|
|
|
|
{
|
|
|
|
volPercent = (volume * 1.5873015873);
|
|
|
|
printf("\x1b[36;1m*\x1b[0m Volume slider state: \x1b[36;1m%d\x1b[0m (\x1b[36;1m%.0lf%%\x1b[0m) \n", volume, volPercent);
|
|
|
|
}
|
2016-10-29 17:04:46 +00:00
|
|
|
|
2017-07-16 07:35:22 +00:00
|
|
|
printf("\x1b[29;0H");
|
2016-10-29 17:04:46 +00:00
|
|
|
_3dSliderPercent = (osGet3DSliderState() * 100.0);
|
2017-07-16 07:35:22 +00:00
|
|
|
printf("\x1b[36;1m*\x1b[0m 3D slider state: \x1b[36;1m%.1lf\x1b[0m (\x1b[36;1m%.0lf%%\x1b[0m) \n", osGet3DSliderState(), _3dSliderPercent);
|
2017-06-25 16:58:31 +00:00
|
|
|
|
2016-10-30 11:35:48 +00:00
|
|
|
gspWaitForVBlank();
|
|
|
|
hidScanInput();
|
2017-04-03 04:16:52 +00:00
|
|
|
u32 kHeld = hidKeysHeld();
|
2017-01-19 16:30:20 +00:00
|
|
|
|
2017-04-03 04:16:52 +00:00
|
|
|
if ((kHeld & KEY_L) && (kHeld & KEY_R))
|
2017-01-19 16:30:20 +00:00
|
|
|
captureScreenshot();
|
2017-04-03 04:16:52 +00:00
|
|
|
|
2017-06-11 18:55:28 +00:00
|
|
|
else if (hidKeysDown() & ANY_KEY)
|
2016-10-30 11:35:48 +00:00
|
|
|
break;
|
2017-01-19 16:30:20 +00:00
|
|
|
|
2016-10-30 11:35:48 +00:00
|
|
|
gfxFlushBuffers();
|
|
|
|
gfxSwapBuffers();
|
2016-10-12 16:11:01 +00:00
|
|
|
}
|
2016-11-06 00:51:42 +00:00
|
|
|
|
2017-02-19 03:00:55 +00:00
|
|
|
termServices();
|
2016-10-29 17:04:46 +00:00
|
|
|
return 0;
|
2017-12-11 21:52:17 +00:00
|
|
|
}
|