mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 23:59:49 -04:00
LogManager: implement system module, client api, logging api (#1617)
Some notes: * Unless `atmosphere!enable_log_manager` is true, Nintendo's log manager will be used instead. * This prevents paying memory costs for LM when not enabling logging. * To facilitate this, Atmosphere's log manager has a different program id from Nintendo's. * `atmosphere!enable_htc` implies `atmosphere!enable_log_manager`. * LogManager logs to tma, and the SD card (if `lm!enable_sd_card_logging` is true, which it is by default). * Binary logs are saved to `lm!sd_card_log_output_directory`, which is `atmosphere/binlogs` by default.
This commit is contained in:
parent
a1fb8a91c8
commit
e9849c74cf
94 changed files with 5595 additions and 45 deletions
|
@ -60,16 +60,16 @@ namespace ams::htc::server {
|
|||
|
||||
/* Update sleeping state. */
|
||||
switch (pm_state) {
|
||||
case psc::PmState_Awake:
|
||||
case psc::PmState_FullAwake:
|
||||
if (g_is_asleep) {
|
||||
g_htclow_manager->NotifyAwake();
|
||||
g_is_asleep = false;
|
||||
}
|
||||
break;
|
||||
case psc::PmState_ReadyAwaken:
|
||||
case psc::PmState_ReadySleep:
|
||||
case psc::PmState_ReadySleepCritical:
|
||||
case psc::PmState_ReadyAwakenCritical:
|
||||
case psc::PmState_MinimumAwake:
|
||||
case psc::PmState_SleepReady:
|
||||
case psc::PmState_EssentialServicesSleepReady:
|
||||
case psc::PmState_EssentialServicesAwake:
|
||||
if (!g_is_asleep) {
|
||||
g_htclow_manager->NotifyAsleep();
|
||||
g_is_asleep = true;
|
||||
|
@ -81,16 +81,16 @@ namespace ams::htc::server {
|
|||
|
||||
/* Update suspend state. */
|
||||
switch (pm_state) {
|
||||
case psc::PmState_Awake:
|
||||
case psc::PmState_ReadyAwaken:
|
||||
case psc::PmState_FullAwake:
|
||||
case psc::PmState_MinimumAwake:
|
||||
if (g_is_suspended) {
|
||||
g_htclow_manager->Resume();
|
||||
g_is_suspended = false;
|
||||
}
|
||||
break;
|
||||
case psc::PmState_ReadySleep:
|
||||
case psc::PmState_ReadySleepCritical:
|
||||
case psc::PmState_ReadyAwakenCritical:
|
||||
case psc::PmState_SleepReady:
|
||||
case psc::PmState_EssentialServicesSleepReady:
|
||||
case psc::PmState_EssentialServicesAwake:
|
||||
if (!g_is_suspended) {
|
||||
g_htclow_manager->Suspend();
|
||||
g_is_suspended = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue