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

Function menuEntryLoadEmbeddedSmdh

source/menu-entry.c:89–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89static bool menuEntryLoadEmbeddedSmdh(menuEntry_s* me)
90{
91 _3DSX_Header header;
92
93 FILE* f = fopen(me->path, "rb");
94 if (!f) return false;
95
96 if (fread(&header, sizeof(header), 1, f) != 1
97 || header.headerSize < sizeof(header)
98 || header.smdhSize < sizeof(smdh_s))
99 {
100 fclose(f);
101 return false;
102 }
103
104 fseek(f, header.smdhOffset, SEEK_SET);
105 bool ok = fread(&me->smdh, sizeof(smdh_s), 1, f) == 1;
106 fclose(f);
107 return ok;
108}
109
110static bool menuEntryLoadExternalSmdh(menuEntry_s* me, const char* file)
111{

Callers 1

menuEntryLoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected