summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2015-04-27 22:45:43 -0400
committerGravatar bunnei2015-05-01 18:27:05 -0400
commitd3c2f9a4a4c48e4571cd693a0c1801b665819cdf (patch)
tree82d8f104a3098277cf0f311db8e93390a69a0b4a /src/core
parentDyncom: Move cream cache to ARMul_State. (diff)
downloadyuzu-d3c2f9a4a4c48e4571cd693a0c1801b665819cdf.tar.gz
yuzu-d3c2f9a4a4c48e4571cd693a0c1801b665819cdf.tar.xz
yuzu-d3c2f9a4a4c48e4571cd693a0c1801b665819cdf.zip
HLE: Properly initialize and shutdown remaining modules.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/config_mem.cpp5
-rw-r--r--src/core/hle/config_mem.h2
-rw-r--r--src/core/hle/hle.cpp9
-rw-r--r--src/core/hle/shared_page.cpp5
-rw-r--r--src/core/hle/shared_page.h2
5 files changed, 20 insertions, 3 deletions
diff --git a/src/core/hle/config_mem.cpp b/src/core/hle/config_mem.cpp
index 30d73adac..9fcfcc285 100644
--- a/src/core/hle/config_mem.cpp
+++ b/src/core/hle/config_mem.cpp
@@ -61,6 +61,8 @@ template void Read<u16>(u16 &var, const u32 addr);
61template void Read<u8>(u8 &var, const u32 addr); 61template void Read<u8>(u8 &var, const u32 addr);
62 62
63void Init() { 63void Init() {
64 memset(&config_mem, 0, sizeof(config_mem));
65
64 config_mem.update_flag = 0; // No update 66 config_mem.update_flag = 0; // No update
65 config_mem.sys_core_ver = 0x2; 67 config_mem.sys_core_ver = 0x2;
66 config_mem.unit_info = 0x1; // Bit 0 set for Retail 68 config_mem.unit_info = 0x1; // Bit 0 set for Retail
@@ -76,4 +78,7 @@ void Init() {
76 config_mem.firm_sys_core_ver = 0x2; 78 config_mem.firm_sys_core_ver = 0x2;
77} 79}
78 80
81void Shutdown() {
82}
83
79} // namespace 84} // namespace
diff --git a/src/core/hle/config_mem.h b/src/core/hle/config_mem.h
index 94853901a..cbb478fb3 100644
--- a/src/core/hle/config_mem.h
+++ b/src/core/hle/config_mem.h
@@ -20,4 +20,6 @@ void Read(T &var, const u32 addr);
20 20
21void Init(); 21void Init();
22 22
23void Shutdown();
24
23} // namespace 25} // namespace
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index c645d6563..191d0411e 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -23,7 +23,7 @@ Common::Profiling::TimingCategory profiler_svc("SVC Calls");
23 23
24static std::vector<ModuleDef> g_module_db; 24static std::vector<ModuleDef> g_module_db;
25 25
26bool g_reschedule = false; ///< If true, immediately reschedules the CPU to a new thread 26bool g_reschedule; ///< If true, immediately reschedules the CPU to a new thread
27 27
28static const FunctionDef* GetSVCInfo(u32 opcode) { 28static const FunctionDef* GetSVCInfo(u32 opcode) {
29 u32 func_num = opcode & 0xFFFFFF; // 8 bits 29 u32 func_num = opcode & 0xFFFFFF; // 8 bits
@@ -73,17 +73,20 @@ static void RegisterAllModules() {
73} 73}
74 74
75void Init() { 75void Init() {
76 Service::Init();
77
78 RegisterAllModules(); 76 RegisterAllModules();
79 77
78 Service::Init();
80 ConfigMem::Init(); 79 ConfigMem::Init();
81 SharedPage::Init(); 80 SharedPage::Init();
82 81
82 g_reschedule = false;
83
83 LOG_DEBUG(Kernel, "initialized OK"); 84 LOG_DEBUG(Kernel, "initialized OK");
84} 85}
85 86
86void Shutdown() { 87void Shutdown() {
88 ConfigMem::Shutdown();
89 SharedPage::Shutdown();
87 Service::Shutdown(); 90 Service::Shutdown();
88 91
89 g_module_db.clear(); 92 g_module_db.clear();
diff --git a/src/core/hle/shared_page.cpp b/src/core/hle/shared_page.cpp
index 568dad684..94fae2551 100644
--- a/src/core/hle/shared_page.cpp
+++ b/src/core/hle/shared_page.cpp
@@ -62,6 +62,8 @@ template void Read<u16>(u16 &var, const u32 addr);
62template void Read<u8>(u8 &var, const u32 addr); 62template void Read<u8>(u8 &var, const u32 addr);
63 63
64void Set3DSlider(float amount) { 64void Set3DSlider(float amount) {
65 memset(&shared_page, 0, sizeof(shared_page));
66
65 shared_page.sliderstate_3d = amount; 67 shared_page.sliderstate_3d = amount;
66 shared_page.ledstate_3d = (amount == 0.0f); // off when non-zero 68 shared_page.ledstate_3d = (amount == 0.0f); // off when non-zero
67} 69}
@@ -71,4 +73,7 @@ void Init() {
71 Set3DSlider(0.0f); 73 Set3DSlider(0.0f);
72} 74}
73 75
76void Shutdown() {
77}
78
74} // namespace 79} // namespace
diff --git a/src/core/hle/shared_page.h b/src/core/hle/shared_page.h
index 8f93545ec..1b6e4e581 100644
--- a/src/core/hle/shared_page.h
+++ b/src/core/hle/shared_page.h
@@ -23,4 +23,6 @@ void Set3DSlider(float amount);
23 23
24void Init(); 24void Init();
25 25
26void Shutdown();
27
26} // namespace 28} // namespace