From 8f243c8369f88610cfc7f2cbdb7a74683f49fd23 Mon Sep 17 00:00:00 2001
From: Lightos1 <124387232+Lightos1@users.noreply.github.com>
Date: Wed, 29 Apr 2026 18:35:42 +0200
Subject: [PATCH] ldr: clean up includes
---
.../Atmosphere/stratosphere/loader/source/oc/customize.hpp | 2 --
.../loader/source/oc/erista/calculate_timings_erista.cpp | 1 -
.../stratosphere/loader/source/oc/mariko/timing_tables.cpp | 2 +-
.../stratosphere/loader/source/oc/mariko/timing_tables.hpp | 2 +-
.../Atmosphere/stratosphere/loader/source/oc/oc_common.hpp | 5 ++++-
Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp | 1 -
.../stratosphere/loader/source/oc/pcv/pcv_common.hpp | 2 ++
7 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp
index 39621889..9b670c02 100644
--- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp
+++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp
@@ -27,8 +27,6 @@
namespace ams::ldr::hoc {
-#include "mtc_timing_table.hpp"
-
enum TableConfig: u32 {
DEFAULT_TABLE = 1,
TBREAK_1581 = 2,
diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/erista/calculate_timings_erista.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/erista/calculate_timings_erista.cpp
index ad482924..f83186ee 100644
--- a/Source/Atmosphere/stratosphere/loader/source/oc/erista/calculate_timings_erista.cpp
+++ b/Source/Atmosphere/stratosphere/loader/source/oc/erista/calculate_timings_erista.cpp
@@ -14,7 +14,6 @@
* along with this program. If not, see .
*/
-#include
#include "../mtc_timing_value.hpp"
namespace ams::ldr::hoc::pcv::erista {
diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.cpp
index 1ab70a8f..61842b3d 100644
--- a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.cpp
+++ b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.cpp
@@ -14,7 +14,7 @@
* along with this program. If not, see .
*/
-#include "../mtc_timing_value.hpp"
+#include "../oc_common.hpp"
#include "timing_tables.hpp"
namespace ams::ldr::hoc::pcv::mariko {
diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp
index c4719369..c23b812d 100644
--- a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp
+++ b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/timing_tables.hpp
@@ -15,7 +15,7 @@
*/
#pragma once
-#include "../mtc_timing_value.hpp"
+#include
namespace ams::ldr::hoc::pcv::mariko {
diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp
index 475cec5e..d1aad2cb 100644
--- a/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp
+++ b/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp
@@ -28,7 +28,10 @@
#endif
#include "customize.hpp"
-#include "oc_log.hpp"
+
+#if defined(AMS_BUILD_FOR_AUDITING) || defined(AMS_BUILD_FOR_DEBUGGING)
+ #include "oc_log.hpp"
+#endif
#define PATCH_OFFSET(offset, value) \
static_assert(sizeof(__typeof__(offset)) <= sizeof(u64)); \
diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp
index faa857b2..a0a06777 100644
--- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp
+++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp
@@ -24,7 +24,6 @@
#include "pcv_common.hpp"
#include "pcv_erista.hpp"
#include "pcv_mariko.hpp"
-#include "pcv_asm.hpp"
namespace ams::ldr::hoc::pcv {
diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp
index cbd6a12f..39d3decc 100644
--- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp
+++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_common.hpp
@@ -18,6 +18,8 @@
#pragma once
+#include "../mtc_timing_table.hpp"
+
namespace ams::ldr::hoc::pcv {
typedef struct cvb_coefficients {