Skip to content

Commit 2fa79f2

Browse files
committed
Bye bye eShop and parental controls, we only rely on album now!
1 parent 39089e9 commit 2fa79f2

File tree

9 files changed

+100
-85
lines changed

9 files changed

+100
-85
lines changed

cur-changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Before anything, as always: new language texts were added to reflect the changes
88

99
- Fixed issues where some theme files were not properly cache'd and thus would not load
1010

11+
- Now, uLaunch's applet processes (uMenu, aka the visible HOME menu, and uLoader, aka any homebrew launched as applets from uMenu) are loaded over the *album* applet by default
12+
13+
- Previously, uMenu would run over *eShop* and uLoader over *parental controls* by default... which was a rather arbitrary choice made years ago
14+
15+
- Now uSystem's code has been adapted so that uLoader, uMenu and other used applets run over the same applet type (now uMenu, uLoader and the regular album all run over the *album* applet process) since that would have caused issues in prior versions
16+
17+
- This might be speculation, but running our stuff over *album* might probably be safer than using something like *eShop* ;)
18+
1119
- The default string (if all language files failed to load) is now `<unknown>` instead of an empty string.
1220

1321
- Invalid, previously selected homebrew takeover applications are reset (if you selected an application as homebrew takeover and then deleted the application, uLaunch would previously crash trying to launch homebrew over it,but now such invalid setting is automatically cleaned)

docs/udesigner.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (ENVIRONMENT_IS_NODE) {
3131

3232
// --pre-jses are emitted after the Module integration code, so that they can
3333
// refer to Module (if they choose; they can also define Module)
34-
// include: /tmp/tmp_tjzxfcs.js
34+
// include: /tmp/tmpcm8urtic.js
3535

3636
Module['expectedDataFileDownloads'] ??= 0;
3737
Module['expectedDataFileDownloads']++;
@@ -212,21 +212,21 @@ Module['FS_createPath']("/", "assets", true, true);
212212

213213
})();
214214

215-
// end include: /tmp/tmp_tjzxfcs.js
216-
// include: /tmp/tmpspovymhz.js
215+
// end include: /tmp/tmpcm8urtic.js
216+
// include: /tmp/tmp_ag4218_.js
217217

218218
// All the pre-js content up to here must remain later on, we need to run
219219
// it.
220220
if (Module['$ww'] || (typeof ENVIRONMENT_IS_PTHREAD != 'undefined' && ENVIRONMENT_IS_PTHREAD)) Module['preRun'] = [];
221221
var necessaryPreJSTasks = Module['preRun'].slice();
222-
// end include: /tmp/tmpspovymhz.js
223-
// include: /tmp/tmpqxq69bix.js
222+
// end include: /tmp/tmp_ag4218_.js
223+
// include: /tmp/tmpxlmjqlzd.js
224224

225225
if (!Module['preRun']) throw 'Module.preRun should exist because file support used it; did a pre-js delete it?';
226226
necessaryPreJSTasks.forEach((task) => {
227227
if (Module['preRun'].indexOf(task) < 0) throw 'All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?';
228228
});
229-
// end include: /tmp/tmpqxq69bix.js
229+
// end include: /tmp/tmpxlmjqlzd.js
230230

231231

232232
// Sometimes an existing Module object exists with properties

docs/udesigner.wasm

-16 Bytes
Binary file not shown.

libs/uCommon/include/ul/cfg/cfg_Config.hpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,13 @@ namespace ul::cfg {
151151

152152
template<typename T>
153153
inline bool SetEntry(const ConfigEntryId id, const T &t) {
154-
for(auto &entry : this->entries) {
155-
if(entry.header.id == id) {
156-
return entry.Set(t);
157-
}
154+
auto entry_it = std::find_if(this->entries.begin(), this->entries.end(), [&](const ConfigEntry &entry) {
155+
return entry.header.id == id;
156+
});
157+
if(entry_it != this->entries.end()) {
158+
return entry_it->Set(t);
158159
}
160+
159161
// Create new entry
160162
ConfigEntry new_entry = {
161163
.header = {
@@ -238,18 +240,19 @@ namespace ul::cfg {
238240

239241
template<typename T>
240242
inline bool GetEntry(const ConfigEntryId id, T &out_t) const {
241-
for(const auto &entry : this->entries) {
242-
if(entry.header.id == id) {
243-
return entry.Get(out_t);
244-
}
243+
auto entry_it = std::find_if(this->entries.begin(), this->entries.end(), [&](const ConfigEntry &entry) {
244+
return entry.header.id == id;
245+
});
246+
if(entry_it != this->entries.end()) {
247+
return entry_it->Get(out_t);
245248
}
246249

247250
// Default values
248251
switch(id) {
249252
case ConfigEntryId::MenuTakeoverProgramId: {
250253
if constexpr(std::is_same_v<T, u64>) {
251-
// Take over eShop by default
252-
out_t = 0x010000000000100B;
254+
// Take over Album by default
255+
out_t = 0x010000000000100D;
253256
return true;
254257
}
255258
else {
@@ -258,8 +261,8 @@ namespace ul::cfg {
258261
}
259262
case ConfigEntryId::HomebrewAppletTakeoverProgramId: {
260263
if constexpr(std::is_same_v<T, u64>) {
261-
// Take over parental control applet by default
262-
out_t = 0x0100000000001001;
264+
// Take over Album by default
265+
out_t = 0x010000000000100D;
263266
return true;
264267
}
265268
else {

libs/uCommon/include/ul/ul_Result.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace ul {
5151
#define UL_LOG_WARN(log_fmt, ...) ::ul::LogImpl(::ul::LogKind::Warning, log_fmt, ##__VA_ARGS__)
5252

5353
template<typename ...Args>
54-
inline void NX_NORETURN OnAssertionFailed(const Result rc, const char *log_fmt, Args &&...args) {
54+
NX_INLINE NX_NORETURN void OnAssertionFailed(const Result rc, const char *log_fmt, Args &&...args) {
5555
LogImpl(LogKind::Critical, log_fmt, args...);
5656

5757
AbortImpl(rc);

libs/uCommon/source/ul/menu/menu_Entries.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ namespace ul::menu {
653653
// Treat empty menu path argument as to use the active menu path
654654
const auto actual_menu_path = menu_path.empty() ? g_ActiveMenuPath : menu_path;
655655

656+
// Menu path must be valid by this point
657+
UL_ASSERT_TRUE(!actual_menu_path.empty());
658+
656659
// Just fill enough fields needed to save the path
657660
const auto entry_idx = FindNextEntryIndex(actual_menu_path);
658661
Entry app_entry = {

projects/uSystem/include/ul/system/la/la_LibraryApplet.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ namespace ul::system::la {
1919

2020
AppletId GetLastAppletId();
2121

22-
bool IsMenu();
2322
void SetMenuAppletId(const AppletId id);
2423
AppletId GetMenuAppletId();
2524

0 commit comments

Comments
 (0)