mirror of
https://github.com/XorTroll/uLaunch
synced 2024-11-22 03:43:04 +00:00
Update to master libraries, other small changes
This commit is contained in:
parent
cb60d5afed
commit
8d1396907d
11 changed files with 63 additions and 44 deletions
|
@ -1 +1 @@
|
|||
Subproject commit f6dac1e67793233cc916f317cf517244dd348a5e
|
||||
Subproject commit 6c11c07e2a7f03952a4e70eb89b47bf528de39c6
|
21
Changelog.md
Normal file
21
Changelog.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Changelog
|
||||
|
||||
## uLaunch
|
||||
|
||||
- Updated with last libnx and Atmosphere.
|
||||
|
||||
- Now, instead of always overriding certain applets (if you had uLaunch on your SD), uLaunch makes use of ECS to launch its processes over a certain applet, so that the applet can be used normally when the process isn't launched.
|
||||
|
||||
- The internal comunication system between uLaunch's processes has changed internally and made more fast and efficient.
|
||||
|
||||
## USB support
|
||||
|
||||
- USB support is back (it was temporarily removed in 0.2.1 due to weird technical issues)
|
||||
|
||||
- USB now supports an alternative system, which is available under certain circumstances (having patches enabling it being on >10.0.0)
|
||||
|
||||
## uMenu
|
||||
|
||||
- When launching homebrew as applications, uMenu won't make use of the internal flog system application it used to use (which might have been risky for potential bans). Instead, making use of ECS (mentioned above), after a donor title has been selected by pressing up, homebrew can easily be launched over that application like normal Atmosphere does. Note that you won't be able to launch homebrew over an application unless you select that application as the donor application.
|
||||
|
||||
- HOME menu pressing is properly supported on the different menus. For instance, pressing the HOME button inside the settings menu will make it return to the main menu.
|
|
@ -18,6 +18,8 @@ LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*
|
|||
SOURCES += $(UL_COMMON_SOURCES)
|
||||
INCLUDES += $(UL_COMMON_INCLUDES)
|
||||
|
||||
LIBS += -ljpeg
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# no real need to edit anything past this point unless you need to add additional
|
||||
# rules for different file extensions
|
||||
|
|
|
@ -420,7 +420,7 @@ namespace {
|
|||
if(g_AlbumAppletLaunchFlag) {
|
||||
if(!am::LibraryAppletIsActive()) {
|
||||
u8 albumflag = 2;
|
||||
UL_ASSERT(am::LibraryAppletStart(AppletId_photoViewer, 0x10000, &albumflag, sizeof(albumflag)));
|
||||
UL_ASSERT(am::LibraryAppletStart(AppletId_LibraryAppletPhotoViewer, 0x10000, &albumflag, sizeof(albumflag)));
|
||||
|
||||
sth_done = true;
|
||||
g_AlbumAppletLaunchFlag = false;
|
||||
|
@ -453,7 +453,7 @@ namespace {
|
|||
}
|
||||
if(!am::LibraryAppletIsActive()) {
|
||||
auto cur_id = am::LibraryAppletGetId();
|
||||
if((cur_id == AppletId_web) || (cur_id == AppletId_photoViewer) || (cur_id == g_Config.homebrew_applet_program_id)) {
|
||||
if((cur_id == AppletId_LibraryAppletWeb) || (cur_id == AppletId_LibraryAppletPhotoViewer) || (cur_id == g_Config.homebrew_applet_program_id)) {
|
||||
auto status = CreateStatus();
|
||||
UL_ASSERT(LaunchMenu(dmi::MenuStartMode::Menu, status));
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace am {
|
|||
Result LibraryAppletPop(AppletStorage *st);
|
||||
|
||||
inline Result WebAppletStart(WebCommonConfig *web) {
|
||||
return LibraryAppletStart(AppletId_web, web->version, &web->arg, sizeof(web->arg));
|
||||
return LibraryAppletStart(AppletId_LibraryAppletWeb, web->version, &web->arg, sizeof(web->arg));
|
||||
}
|
||||
|
||||
u64 LibraryAppletGetProgramIdForAppletId(AppletId id);
|
||||
|
@ -24,6 +24,4 @@ namespace am {
|
|||
|
||||
AppletId LibraryAppletGetId();
|
||||
|
||||
static constexpr AppletId InvalidAppletId = static_cast<AppletId>(0);
|
||||
|
||||
}
|
|
@ -5,27 +5,27 @@ namespace am {
|
|||
namespace {
|
||||
|
||||
AppletHolder g_AppletHolder;
|
||||
AppletId g_MenuAppletId = InvalidAppletId;
|
||||
AppletId g_LastAppletId = InvalidAppletId;
|
||||
AppletId g_MenuAppletId = AppletId_None;
|
||||
AppletId g_LastAppletId = AppletId_None;
|
||||
|
||||
const std::map<u64, AppletId> g_AppletIdTable = {
|
||||
{ 0x0100000000001001, AppletId_auth },
|
||||
{ 0x0100000000001002, AppletId_cabinet },
|
||||
{ 0x0100000000001003, AppletId_controller },
|
||||
{ 0x0100000000001004, AppletId_dataErase },
|
||||
{ 0x0100000000001005, AppletId_error },
|
||||
{ 0x0100000000001006, AppletId_netConnect },
|
||||
{ 0x0100000000001007, AppletId_playerSelect },
|
||||
{ 0x0100000000001008, AppletId_swkbd },
|
||||
{ 0x0100000000001009, AppletId_miiEdit },
|
||||
{ 0x010000000000100A, AppletId_web },
|
||||
{ 0x010000000000100B, AppletId_shop },
|
||||
{ 0x010000000000100D, AppletId_photoViewer },
|
||||
{ 0x010000000000100E, AppletId_set },
|
||||
{ 0x010000000000100F, AppletId_offlineWeb },
|
||||
{ 0x0100000000001010, AppletId_loginShare },
|
||||
{ 0x0100000000001011, AppletId_wifiWebAuth },
|
||||
{ 0x0100000000001013, AppletId_myPage }
|
||||
{ 0x0100000000001001, AppletId_LibraryAppletAuth },
|
||||
{ 0x0100000000001002, AppletId_LibraryAppletCabinet },
|
||||
{ 0x0100000000001003, AppletId_LibraryAppletController },
|
||||
{ 0x0100000000001004, AppletId_LibraryAppletDataErase },
|
||||
{ 0x0100000000001005, AppletId_LibraryAppletError },
|
||||
{ 0x0100000000001006, AppletId_LibraryAppletNetConnect },
|
||||
{ 0x0100000000001007, AppletId_LibraryAppletPlayerSelect },
|
||||
{ 0x0100000000001008, AppletId_LibraryAppletSwkbd },
|
||||
{ 0x0100000000001009, AppletId_LibraryAppletMiiEdit },
|
||||
{ 0x010000000000100A, AppletId_LibraryAppletWeb },
|
||||
{ 0x010000000000100B, AppletId_LibraryAppletShop },
|
||||
{ 0x010000000000100D, AppletId_LibraryAppletPhotoViewer },
|
||||
{ 0x010000000000100E, AppletId_LibraryAppletSet },
|
||||
{ 0x010000000000100F, AppletId_LibraryAppletOfflineWeb },
|
||||
{ 0x0100000000001010, AppletId_LibraryAppletLoginShare },
|
||||
{ 0x0100000000001011, AppletId_LibraryAppletWifiWebAuth },
|
||||
{ 0x0100000000001013, AppletId_LibraryAppletMyPage }
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace am {
|
|||
}
|
||||
|
||||
bool LibraryAppletIsMenu() {
|
||||
return LibraryAppletIsActive() && (g_MenuAppletId != InvalidAppletId) && (LibraryAppletGetId() == g_MenuAppletId);
|
||||
return LibraryAppletIsActive() && (g_MenuAppletId != AppletId_None) && (LibraryAppletGetId() == g_MenuAppletId);
|
||||
}
|
||||
|
||||
void LibraryAppletTerminate() {
|
||||
|
@ -130,13 +130,13 @@ namespace am {
|
|||
if(it != g_AppletIdTable.end()) {
|
||||
return it->second;
|
||||
}
|
||||
return InvalidAppletId;
|
||||
return AppletId_None;
|
||||
}
|
||||
|
||||
AppletId LibraryAppletGetId() {
|
||||
auto idcopy = g_LastAppletId;
|
||||
if(!LibraryAppletIsActive()) {
|
||||
g_LastAppletId = InvalidAppletId;
|
||||
g_LastAppletId = AppletId_None;
|
||||
}
|
||||
return idcopy;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,11 @@
|
|||
"folder_entry_single": "entry",
|
||||
"folder_entry_mult": "entries",
|
||||
"app_launch": "Title launch",
|
||||
"app_no_take_over_title": "There is no title specified for homebrew to take over it.",
|
||||
"app_take_over_title_select": "Select one by pressing up over it.",
|
||||
"app_take_over_select": "Would you like to select this title for homebrew launching?",
|
||||
"app_take_over_selected": "If selected, homebrew will be launched as an application over this title.",
|
||||
"app_take_over_done": "This title was selected to be used for homebrew launching.",
|
||||
"app_unexpected_error": "A title failed to start, crashed or unexpectedly terminated.\n(Could it be corrupted? If it is a gamecard title, do you have it inserted?)",
|
||||
"ulaunch_about": "About uLaunch",
|
||||
"ulaunch_desc": "uLaunch is a free, open source, extended and homebrew-oriented HOME menu replacement.\nNote that some original HOME menu functionalities aren't implemented yet.\n\nIf you're looking for new uLaunch themes, check r/uLaunchThemes subreddit.\nIf you would like to contribute, check uLaunch's GitHub repository",
|
||||
|
|
|
@ -45,16 +45,13 @@ namespace am {
|
|||
Mutex g_StopLock = EmptyMutex;
|
||||
Mutex g_ReceiverLock = EmptyMutex;
|
||||
bool g_Initialized = false;
|
||||
bool g_ReceiveThreadShouldStop = false;
|
||||
std::atomic_bool g_ReceiveThreadShouldStop = false;
|
||||
Thread g_ReceiverThread;
|
||||
std::vector<std::pair<MessageDetectCallback, dmi::MenuMessage>> g_ReceiverCallbackTable;
|
||||
|
||||
void DaemonMessageReceiverThread(void*) {
|
||||
while(true) {
|
||||
mutexLock(&g_StopLock);
|
||||
auto should_stop = g_ReceiveThreadShouldStop;
|
||||
mutexUnlock(&g_StopLock);
|
||||
if(should_stop) {
|
||||
if(g_ReceiveThreadShouldStop) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -80,7 +77,7 @@ namespace am {
|
|||
R_TRY(daemonInitializePrivateService());
|
||||
|
||||
g_ReceiveThreadShouldStop = false;
|
||||
R_TRY(threadCreate(&g_ReceiverThread, &DaemonMessageReceiverThread, nullptr, nullptr, 0x1000, 0x2B, -2));
|
||||
R_TRY(threadCreate(&g_ReceiverThread, &DaemonMessageReceiverThread, nullptr, nullptr, 0x1000, 49, -2));
|
||||
R_TRY(threadStart(&g_ReceiverThread));
|
||||
|
||||
g_Initialized = true;
|
||||
|
@ -92,10 +89,7 @@ namespace am {
|
|||
return;
|
||||
}
|
||||
|
||||
mutexLock(&g_StopLock);
|
||||
g_ReceiveThreadShouldStop = true;
|
||||
mutexUnlock(&g_StopLock);
|
||||
|
||||
threadWaitForExit(&g_ReceiverThread);
|
||||
threadClose(&g_ReceiverThread);
|
||||
|
||||
|
|
|
@ -147,9 +147,9 @@ namespace ui::actions {
|
|||
|
||||
auto smsg = os::SystemAppletMessage::Create(msg);
|
||||
os::PushSystemAppletMessage(smsg);
|
||||
svcSleepThread(1'500'000'000L);
|
||||
svcSleepThread(1'500'000'000ul);
|
||||
|
||||
// When we get back after sleep we will do a cool fade in, whereas wuth the other options the console will be already off/rebooted
|
||||
// When we get back after sleep we will do a cool fade in, whereas with the other options the console will be already off/rebooted
|
||||
g_MenuApplication->FadeIn();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -567,12 +567,11 @@ namespace ui {
|
|||
}
|
||||
else if(down & KEY_UP) {
|
||||
if(type == cfg::TitleType::Installed) {
|
||||
// TODO: strings
|
||||
auto sopt = g_MenuApplication->CreateShowDialog("Homebrew title take-over", "Would you like to select this title for homebrew launching?\nIf selected, homebrew will be launched as an application over this title.", { "Yes", "Cancel" }, true);
|
||||
auto sopt = g_MenuApplication->CreateShowDialog(cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "app_launch"), cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "app_take_over_select") + "\n" + cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "app_take_over_selected"), { "Yes", "Cancel" }, true);
|
||||
if(sopt == 0) {
|
||||
g_Config.homebrew_title_application_id = title.app_id;
|
||||
cfg::SaveConfig(g_Config);
|
||||
g_MenuApplication->ShowNotification("Done");
|
||||
g_MenuApplication->ShowNotification(cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "app_take_over_done"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -857,7 +856,7 @@ namespace ui {
|
|||
}
|
||||
}
|
||||
else {
|
||||
g_MenuApplication->CreateShowDialog("Launch", "There is no title specified for homebrew to take over it.\nSelect one by pressing up over it.", { "Ok" }, true);
|
||||
g_MenuApplication->CreateShowDialog(cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "app_launch"), cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "app_no_take_over_title") + "\n" + cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "app_take_over_title_select"), { cfg::GetLanguageString(g_Config.main_lang, g_Config.default_lang, "ok") }, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ namespace ui {
|
|||
LibAppletArgs netargs;
|
||||
libappletArgsCreate(&netargs, 0);
|
||||
|
||||
auto rc = libappletLaunch(AppletId_netConnect, &netargs, in, sizeof(in), out, sizeof(out), nullptr);
|
||||
auto rc = libappletLaunch(AppletId_LibraryAppletNetConnect, &netargs, in, sizeof(in), out, sizeof(out), nullptr);
|
||||
if(R_SUCCEEDED(rc)) {
|
||||
rc = *reinterpret_cast<Result*>(out);
|
||||
if(R_SUCCEEDED(rc)) {
|
||||
|
|
Loading…
Reference in a new issue