Skip to content

Commit

Permalink
temporarily steal code from lpp-3ds until I fix mine
Browse files Browse the repository at this point in the history
  • Loading branch information
Gruetzig committed May 18, 2023
1 parent 4597f51 commit 4f7f48b
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions source/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,20 @@ int getClockRateMode() {
}

void getUsernameFromCfgSavegame(char* out) {
char username[0x1C];
/*u8 username[0x1C+1];
u16 _username[0x1C];
CFGU_GetConfigInfoBlk2(0x1C, 0x000A0000, _username);
utf16_to_utf8((u8*)username, _username, 0x1C);
username[0x1C-1] = '\0';
sprintf(out, "%s", username);
utf16_to_utf8(username, _username, 0x1C);
username[0x1C] = '\0';
sprintf(out, "%x", username[5]);*/

char username_tmp[0x1C];
CFGU_GetConfigInfoBlk2(0x1C, 0xA0000, (u8*)&username_tmp);
int i;
for (i = 0; i < 0x0E; i++){
out[i] = username_tmp[i<<1];
}
out[i] = '\0';
}

void getSystemLanguage(char* out) {
Expand Down Expand Up @@ -223,3 +231,7 @@ void getShortNameFromModel(u8 model, char* out) {
sprintf(out, "unknown");
}
}

void getLumaVersion() {

}

0 comments on commit 4f7f48b

Please sign in to comment.