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

Function launchMenuEntry

source/launch.c:99–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void launchMenuEntry(menuEntry_s* me)
100{
101 bool canUseTitles = loaderCanUseTitles();
102 if (me->descriptor.numTargetTitles && canUseTitles)
103 {
104 // Update the list of available titles
105 titlesCheckUpdate(false, UI_STATE_NULL);
106
107 int i;
108 for (i = 0; i < me->descriptor.numTargetTitles; i ++)
109 if (titlesExists(me->descriptor.targetTitles[i].tid, me->descriptor.targetTitles[i].mediatype))
110 break;
111
112 if (i == me->descriptor.numTargetTitles)
113 {
114 errorScreen(s_loader->name, textGetString(StrId_MissingTargetTitle));
115 return;
116 }
117
118 // Use the title
119 s_loader->useTitle(me->descriptor.targetTitles[i].tid, me->descriptor.targetTitles[i].mediatype);
120 } else if (me->descriptor.selectTargetProcess)
121 {
122 if (!canUseTitles)
123 {
124 errorScreen(s_loader->name, textGetString(StrId_NoTargetTitleSupport));
125 return;
126 }
127
128 // Launch the title selector
129 if (!me->titleSelected)
130 {
131 titleSelectInit(me);
132 return;
133 }
134
135 // Use the title
136 s_loader->useTitle(me->titleId, me->titleMediatype);
137 }
138
139 // Scan the executable if needed
140 if (loaderHasFlag(LOADER_NEED_SCAN))
141 descriptorScanFile(&me->descriptor, me->path);
142
143 // Launch it
144 s_loader->launchFile(me->path, &me->args, &me->descriptor.executableMetadata);
145}
146
147Handle launchOpenFile(const char* path)
148{

Callers 3

netloaderTaskFunction · 0.85
launchMenuEntryTaskFunction · 0.85
launchEntryFunction · 0.85

Calls 8

loaderCanUseTitlesFunction · 0.85
titlesCheckUpdateFunction · 0.85
titlesExistsFunction · 0.85
errorScreenFunction · 0.85
textGetStringFunction · 0.85
titleSelectInitFunction · 0.85
loaderHasFlagFunction · 0.85
descriptorScanFileFunction · 0.85

Tested by

no test coverage detected