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

Function descriptorScanFile

source/parsing/scanner.c:121–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void descriptorScanFile(descriptor_s* d, const char* path)
122{
123 executableMetadata_s* em = &d->executableMetadata;
124
125 // Retrieve section sizes from the executable and, if autodetection is enabled,
126 // scan it for service names (default, not ideal but whatchagonnado)
127 scannerScan(em, path, d->autodetectServices);
128
129 if (!d->autodetectServices)
130 {
131 // Populate the metadata structure with section sizes and requested services from descriptor
132 int i, j;
133 for(i=0; i<d->numRequestedServices; i++)
134 {
135 for(j=0; j<NUM_SERVICESTHATMATTER; j++)
136 {
137 if(!strcmp(d->requestedServices[i].name, servicesThatMatter[j]))
138 {
139 em->servicesThatMatter[j] = d->requestedServices[i].priority;
140 break;
141 }
142 }
143 }
144 em->scanned = true;
145 }
146}

Callers 1

launchMenuEntryFunction · 0.85

Calls 1

scannerScanFunction · 0.85

Tested by

no test coverage detected