mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 23:59:49 -04:00
dns.mitm: parse redirections from hosts file
This commit is contained in:
parent
3fd094436e
commit
6706fa49dc
9 changed files with 378 additions and 9 deletions
|
@ -22,6 +22,9 @@ namespace ams::emummc {
|
|||
/* Get whether emummc is active. */
|
||||
bool IsActive();
|
||||
|
||||
/* Get the active emummc id. */
|
||||
u32 GetActiveId();
|
||||
|
||||
/* Get Nintendo redirection path. */
|
||||
const char *GetNintendoDirPath();
|
||||
|
||||
|
|
|
@ -57,10 +57,10 @@ namespace ams::emummc {
|
|||
};
|
||||
|
||||
/* Globals. */
|
||||
os::Mutex g_lock(false);
|
||||
ExosphereConfig g_exo_config;
|
||||
bool g_is_emummc;
|
||||
bool g_has_cached;
|
||||
constinit os::SdkMutex g_lock;
|
||||
constinit ExosphereConfig g_exo_config;
|
||||
constinit bool g_is_emummc;
|
||||
constinit bool g_has_cached;
|
||||
|
||||
/* Helpers. */
|
||||
void CacheValues() {
|
||||
|
@ -110,6 +110,12 @@ namespace ams::emummc {
|
|||
return g_is_emummc;
|
||||
}
|
||||
|
||||
/* Get the active emummc id. */
|
||||
u32 GetActiveId() {
|
||||
CacheValues();
|
||||
return g_exo_config.base_cfg.id;
|
||||
}
|
||||
|
||||
/* Get Nintendo redirection path. */
|
||||
const char *GetNintendoDirPath() {
|
||||
CacheValues();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue