2
0
Fork 0
mirror of https://github.com/XorTroll/uLaunch synced 2025-02-18 13:38:32 +00:00

Show homebrew first, actually save configs :P

This commit is contained in:
XorTroll 2019-11-03 18:20:50 +01:00
parent cd045870bb
commit 573a389372
5 changed files with 16 additions and 20 deletions
Common/Source
LibraryAppletQHbTarget
LibraryAppletQMenu/Source/ui
SystemApplicationQHbTarget

View file

@ -559,14 +559,6 @@ namespace cfg
// Installed titles first
auto [rc, titles] = os::QueryInstalledTitles(cache);
if(R_SUCCEEDED(rc))
{
for(auto &title: titles)
{
list.root.titles.push_back(title);
}
}
else return MakeResultWith(rc, list);
FS_FOR(std::string(Q_ENTRIES_PATH), name, path,
{
@ -593,10 +585,10 @@ namespace cfg
rec.author = entry.value("author", "");
rec.version = entry.value("version", "");
auto find = STL_FIND_IF(list.root.titles, tit, (tit.app_id == appid));
if(STL_FOUND(list.root.titles, find))
auto find = STL_FIND_IF(titles, tit, (tit.app_id == appid));
if(STL_FOUND(titles, find))
{
list.root.titles.erase(find);
titles.erase(find);
}
auto find2 = STL_FIND_IF(list.folders, fld, (fld.name == folder));
@ -627,6 +619,7 @@ namespace cfg
rec.author = entry.value("author", "");
rec.version = entry.value("version", "");
CacheHomebrew(nropath);
std::string argv = entry.value("nro_argv", "");
strcpy(rec.nro_target.nro_path, nropath.c_str());
if(!argv.empty()) strcpy(rec.nro_target.argv, argv.c_str());
@ -652,6 +645,11 @@ namespace cfg
}
})
for(auto &title: titles)
{
list.root.titles.push_back(title);
}
return SuccessResultWith(list);
}

View file

@ -87,12 +87,6 @@ void __appInit(void)
fsdevMountSdmc();
}
void __wrap_exit(void)
{
// exit() effectively never gets called, so let's stub it out.
fatalSimple(MAKERESULT(Module_HomebrewLoader, 39));
}
static void* g_heapAddr;
static size_t g_heapSize;

View file

@ -27,7 +27,7 @@ EXEFS_SRC := exefs_src
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -Wl,-wrap,apmInitialize -Wl,-wrap,apmSetPerformanceConfiguration -Wl,-wrap,apmExit -Wl,-wrap,exit
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -Wl,-wrap,apmInitialize -Wl,-wrap,apmSetPerformanceConfiguration -Wl,-wrap,apmExit
CFLAGS := -g -Wall -O2 -ffunction-sections \
$(ARCH) $(DEFINES)

View file

@ -155,7 +155,11 @@ namespace ui
break;
}
}
if(reload_need) this->Reload();
if(reload_need)
{
cfg::SaveConfig(config);
this->Reload();
}
}
void SettingsMenuLayout::OnInput(u64 down, u64 up, u64 held, pu::ui::Touch pos)

View file

@ -27,7 +27,7 @@ EXEFS_SRC := exefs_src
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -Wl,-wrap,apmInitialize -Wl,-wrap,apmSetPerformanceConfiguration -Wl,-wrap,apmExit -Wl,-wrap,exit
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -Wl,-wrap,apmInitialize -Wl,-wrap,apmSetPerformanceConfiguration -Wl,-wrap,apmExit
CFLAGS := -g -Wall -O2 -ffunction-sections \
$(ARCH) $(DEFINES)