MCPcopy Create free account
hub / github.com/devkitPro/3ds-hbmenu / menuEntryParseSmdh

Function menuEntryParseSmdh

source/menu-entry.c:588–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588void menuEntryParseSmdh(menuEntry_s* me)
589{
590 if (!me->icon)
591 {
592 me->icon = &me->texture;
593 C3D_TexInit(me->icon, 64, 64, GPU_RGB565);
594 }
595
596 // Copy 48x48 -> 64x64
597 u16* dest = (u16*)me->icon->data + (64-48)*64;
598 u16* src = (u16*)me->smdh.bigIconData;
599 int j;
600 for (j = 0; j < 48; j += 8)
601 {
602 memcpy(dest, src, 48*8*sizeof(u16));
603 src += 48*8;
604 dest += 64*8;
605 }
606
607 int lang = textGetLang();
608 safe_utf8_convert(me->name, me->smdh.applicationTitles[lang].shortDescription, ENTRY_NAMELENGTH);
609 safe_utf8_convert(me->description, me->smdh.applicationTitles[lang].longDescription, ENTRY_NAMELENGTH);
610 safe_utf8_convert(me->author, me->smdh.applicationTitles[lang].publisher, ENTRY_NAMELENGTH);
611}

Callers 2

menuEntryLoadFunction · 0.85
loadTitleDataFunction · 0.85

Calls 2

textGetLangFunction · 0.85
safe_utf8_convertFunction · 0.85

Tested by

no test coverage detected