summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-02-19 03:38:23 +0100
committerbunnei <bunneidev@gmail.com>2021-03-21 22:45:02 +0100
commit57625177289624051e107578ccfce749a083f51a (patch)
tree621cbc34ccd83fbe64e6d9e5cd4f7ca2bb4db6f5 /src/core/hle
parenthle: kernel: KMemoryManager: Add CalculateManagementOverheadSize. (diff)
downloadyuzu-57625177289624051e107578ccfce749a083f51a.tar
yuzu-57625177289624051e107578ccfce749a083f51a.tar.gz
yuzu-57625177289624051e107578ccfce749a083f51a.tar.bz2
yuzu-57625177289624051e107578ccfce749a083f51a.tar.lz
yuzu-57625177289624051e107578ccfce749a083f51a.tar.xz
yuzu-57625177289624051e107578ccfce749a083f51a.tar.zst
yuzu-57625177289624051e107578ccfce749a083f51a.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp (renamed from src/core/hle/kernel/k_system_control.cpp)8
-rw-r--r--src/core/hle/kernel/board/nintendo/nx/k_system_control.h22
-rw-r--r--src/core/hle/kernel/k_system_control.h18
3 files changed, 39 insertions, 9 deletions
diff --git a/src/core/hle/kernel/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
index aa1682f69..0f41c4110 100644
--- a/src/core/hle/kernel/k_system_control.cpp
+++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
@@ -6,7 +6,11 @@
#include "core/hle/kernel/k_system_control.h"
-namespace Kernel {
+namespace Kernel::Board::Nintendo::Nx {
+
+bool KSystemControl::Init::ShouldIncreaseThreadResourceLimit() {
+ return true;
+}
namespace {
template <typename F>
@@ -39,4 +43,4 @@ u64 KSystemControl::GenerateRandomRange(u64 min, u64 max) {
return GenerateUniformRange(min, max, GenerateRandomU64);
}
-} // namespace Kernel
+} // namespace Kernel::Board::Nintendo::Nx
diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.h b/src/core/hle/kernel/board/nintendo/nx/k_system_control.h
new file mode 100644
index 000000000..3fde61971
--- /dev/null
+++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.h
@@ -0,0 +1,22 @@
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "common/common_types.h"
+
+namespace Kernel::Board::Nintendo::Nx {
+
+class KSystemControl {
+public:
+ class Init {
+ public:
+ static bool ShouldIncreaseThreadResourceLimit();
+ };
+
+ static u64 GenerateRandomRange(u64 min, u64 max);
+ static u64 GenerateRandomU64();
+};
+
+} // namespace Kernel::Board::Nintendo::Nx
diff --git a/src/core/hle/kernel/k_system_control.h b/src/core/hle/kernel/k_system_control.h
index 1d5b64ffa..d755082c2 100644
--- a/src/core/hle/kernel/k_system_control.h
+++ b/src/core/hle/kernel/k_system_control.h
@@ -6,14 +6,18 @@
#include "common/common_types.h"
-namespace Kernel {
+#define BOARD_NINTENDO_NX
+
+#ifdef BOARD_NINTENDO_NX
-class KSystemControl {
-public:
- KSystemControl() = default;
+#include "core/hle/kernel/board/nintendo/nx/k_system_control.h"
- static u64 GenerateRandomRange(u64 min, u64 max);
- static u64 GenerateRandomU64();
-};
+namespace Kernel {
+
+using Kernel::Board::Nintendo::Nx::KSystemControl;
} // namespace Kernel
+
+#else
+#error "Unknown board for KSystemControl"
+#endif