mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
fix iggy skin selector (again)
This commit is contained in:
parent
ba406c7e97
commit
1fcd456c30
|
|
@ -595,10 +595,11 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_SkinSelectMenu::customDraw(IggyCustomDrawCallbackRegion* region) {
|
void UIScene_SkinSelectMenu::customDraw(IggyCustomDrawCallbackRegion* region) {
|
||||||
int characterId = -1;
|
// int characterId = -1;
|
||||||
// 4jcraft TODO: undefined behavior
|
// swscanf((wchar_t*)region->name,L"Character%d",&characterId);
|
||||||
swscanf((wchar_t*)region->name, L"Character%d", &characterId);
|
// 4jcraft: fuck wchar_t
|
||||||
if (characterId == -1) {
|
int characterId =region->name[9] - '0' < 0 ? -1 : region->name[9] - '0';
|
||||||
|
if (characterId == -1) {
|
||||||
app.DebugPrintf("Invalid character to render found\n");
|
app.DebugPrintf("Invalid character to render found\n");
|
||||||
} else {
|
} else {
|
||||||
// Setup GDraw, normal game render states and matrices
|
// Setup GDraw, normal game render states and matrices
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue