fix namespace overusage

This commit is contained in:
Lightos1 committed 2026-09-11 13:11:04 +02:00
1 parent 1741e27116
commit 8fc18ee3e8
41 files changed
+438 -440

No files matched your search

@@ -21,7 +21,7 @@
#include "process_management.hpp"
#include <sys/stat.h>
namespace integrations {
namespace hos {
namespace {
@@ -98,7 +98,7 @@ namespace integrations {
if (!gSharedMemoryUsed)
return 254;
u64 tid = processManagement::GetCurrentApplicationId();
u64 tid = GetCurrentApplicationId();
if (tid == 0)
return 254;
@@ -119,7 +119,7 @@ namespace integrations {
if (!gSharedMemoryUsed)
return 0;
u64 tid = processManagement::GetCurrentApplicationId();
u64 tid = GetCurrentApplicationId();
if (tid == 0)
return 0;
@@ -151,4 +151,4 @@ namespace integrations {
return 0;
}
} // namespace integrations
} // namespace hos
@@ -20,7 +20,7 @@
#include <hocclk.h>
#include <switch.h>
namespace integrations {
namespace hos {
struct NxFpsSharedBlock {
uint32_t MAGIC;
@@ -66,4 +66,4 @@ namespace integrations {
u8 GetSaltyNXFPS();
u16 GetSaltyNXResolutionHeight();
} // namespace integrations
} // namespace hos
+2 -2
View File
@@ -24,7 +24,7 @@
#include "../file/file_utils.hpp"
namespace lang {
namespace hos {
namespace {
constexpr const char *UltrahandConfigPath = "sdmc:/config/ultrahand/config.ini";
@@ -138,4 +138,4 @@ namespace lang {
return text;
}
} // namespace lang
} // namespace hos
+2 -2
View File
@@ -19,11 +19,11 @@
#include <string>
namespace lang {
namespace hos {
// Translates text using Ultrahand's language setting and
// /config/horizon-oc/lang/<lang>.json (same format as the overlay).
// Returns the original text when no translation is available.
std::string Translate(const std::string &text);
} // namespace lang
} // namespace hos
@@ -18,8 +18,8 @@
#include "lang.hpp"
#include "notification.h"
namespace notification {
void writeNotification(const std::string &message) {
namespace hos {
void WriteNotification(const std::string &message) {
static const char *flagPath = "sdmc:/config/ultrahand/flags/NOTIFICATIONS.flag";
FILE *flagFile = fopen(flagPath, "r");
@@ -28,7 +28,7 @@ namespace notification {
}
fclose(flagFile);
const std::string translated = lang::Translate(message);
const std::string translated = Translate(message);
std::string filename = "hoc-" + std::to_string(std::time(nullptr)) + ".notify";
std::string fullPath = "sdmc:/config/ultrahand/notifications/" + filename;
@@ -42,4 +42,4 @@ namespace notification {
fclose(file);
}
}
} // namespace notification
} // namespace hos
@@ -20,6 +20,6 @@
#include <cstdio>
#include <ctime>
#include <string>
namespace notification {
void writeNotification(const std::string &message);
namespace hos {
void WriteNotification(const std::string &message);
}
@@ -31,7 +31,7 @@
#include "process_management.hpp"
namespace processManagement {
namespace hos {
namespace {
constexpr u64 Qlaunch = 0x0100000000001000ULL;
@@ -39,7 +39,7 @@ namespace processManagement {
Service pdmqryClone;
} // namespace
void Initialize() {
void InitializeProcessManagement() {
Result rc = 0;
rc = pmdmntInitialize();
@@ -67,7 +67,7 @@ namespace processManagement {
}
// Ty to Masa for this function!
Result isApplicationOutOfFocus(bool *outOfFocus) {
Result IsApplicationOutOfFocus(bool *outOfFocus) {
static s32 last_total_entries = 0;
static bool isOutOfFocus = false;
s32 total_entries = 0;
@@ -158,10 +158,10 @@ namespace processManagement {
return tid;
}
void Exit() {
void ExitProcessManagement() {
pmdmntExit();
pminfoExit();
pdmqryExit();
}
} // namespace processManagement
} // namespace hos
@@ -27,12 +27,12 @@
#pragma once
#include <switch.h>
namespace processManagement {
namespace hos {
void Initialize();
void InitializeProcessManagement();
void WaitForQLaunch();
u64 GetCurrentApplicationId();
Result isApplicationOutOfFocus(bool *outOfFocus);
void Exit();
Result IsApplicationOutOfFocus(bool *outOfFocus);
void ExitProcessManagement();
} // namespace processManagement
} // namespace hos