mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-22 18:26:39 +00:00
Update to v1.1.14.
This commit is contained in:
parent
ecae2210e4
commit
b1fa56d478
3 changed files with 39 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -33,7 +33,7 @@ include $(DEVKITPRO)/libnx/switch_rules
|
|||
|
||||
VERSION_MAJOR := 1
|
||||
VERSION_MINOR := 1
|
||||
VERSION_MICRO := 13
|
||||
VERSION_MICRO := 14
|
||||
|
||||
APP_TITLE := nxdumptool
|
||||
APP_AUTHOR := DarkMatterCore
|
||||
|
|
|
@ -73,6 +73,12 @@ Thanks to
|
|||
Changelog
|
||||
--------------
|
||||
|
||||
**v1.1.14:**
|
||||
|
||||
* Fixed support for HOS 12.0.x / AMS 0.19.x. If needed, TIPC serialization is now used to dispatch the `AtmosphereHasService` IPC request.
|
||||
|
||||
This is only a bugfix release. I don't expect to release any new versions until the rewrite is finished - the only exception being fixing some kind of feature-breaking bug. Please understand.
|
||||
|
||||
**v1.1.13:**
|
||||
|
||||
* Fixed compatibility with latest libnx release.
|
||||
|
|
|
@ -106,6 +106,10 @@ char freeSpaceStr[32] = {'\0'};
|
|||
|
||||
browser_entry_size_info *hfs0ExeFsEntriesSizes = NULL;
|
||||
|
||||
static const u32 g_smAtmosphereHasService = 65100;
|
||||
static const SplConfigItem SplConfigItem_ExosphereApiVersion = (SplConfigItem)65000;
|
||||
static const u32 g_atmosphereTipcVersion = MAKEHOSVERSION(0, 19, 0);
|
||||
|
||||
void loadConfig()
|
||||
{
|
||||
// Set default configuration values
|
||||
|
@ -398,11 +402,36 @@ void unmountSysEmmcPartition()
|
|||
}
|
||||
}
|
||||
|
||||
static bool getExosphereApiVersion(u32 *out)
|
||||
{
|
||||
if (!out) return false;
|
||||
|
||||
Result rc = 0;
|
||||
u64 version = 0;
|
||||
|
||||
rc = splGetConfig(SplConfigItem_ExosphereApiVersion, &version);
|
||||
if (R_FAILED(rc)) return false;
|
||||
|
||||
*out = (u32)((version >> 40) & 0xFFFFFF);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static Result smAtmosphereHasService(bool *out, SmServiceName name)
|
||||
{
|
||||
u8 tmp = 0;
|
||||
Result rc = serviceDispatchInOut(smGetServiceSession(), 65100, name, tmp);
|
||||
Result rc = 0;
|
||||
u32 version = 0;
|
||||
|
||||
if (hosversionAtLeast(12, 0, 0) || (getExosphereApiVersion(&version) && version >= g_atmosphereTipcVersion))
|
||||
{
|
||||
rc = tipcDispatchInOut(smGetServiceSessionTipc(), g_smAtmosphereHasService, name, tmp);
|
||||
} else {
|
||||
rc = serviceDispatchInOut(smGetServiceSession(), g_smAtmosphereHasService, name, tmp);
|
||||
}
|
||||
|
||||
if (R_SUCCEEDED(rc) && out) *out = tmp;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -411,9 +440,9 @@ static bool isServiceRunning(const char *name)
|
|||
if (!name || !*name) return false;
|
||||
|
||||
bool out = false;
|
||||
SmServiceName service_name = smEncodeName(name);
|
||||
SmServiceName srv_name = smEncodeName(name);
|
||||
|
||||
Result rc = smAtmosphereHasService(&out, service_name);
|
||||
Result rc = smAtmosphereHasService(&out, srv_name);
|
||||
return (R_SUCCEEDED(rc) && out);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue