summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-10 22:15:07 -0400
committerGravatar bunnei2014-04-10 22:15:07 -0400
commit3bd041f5b0cd481ded892594d569462492679e39 (patch)
tree6f4c64d1ae09983b8c4d2b8c10f3fa51bef01507 /src
parent- removed syscall classes (will just use HLEFunction) (diff)
downloadyuzu-3bd041f5b0cd481ded892594d569462492679e39.tar.gz
yuzu-3bd041f5b0cd481ded892594d569462492679e39.tar.xz
yuzu-3bd041f5b0cd481ded892594d569462492679e39.zip
changed some naming/misc cleanups
Diffstat (limited to 'src')
-rw-r--r--src/core/hle.cpp6
-rw-r--r--src/core/hle/hle.h28
-rw-r--r--src/core/hle/hle_syscall.cpp4
-rw-r--r--src/core/hle/hle_syscall.h3
4 files changed, 20 insertions, 21 deletions
diff --git a/src/core/hle.cpp b/src/core/hle.cpp
index f0c7d2178..8dad7695b 100644
--- a/src/core/hle.cpp
+++ b/src/core/hle.cpp
@@ -11,10 +11,10 @@
11 11
12namespace HLE { 12namespace HLE {
13 13
14static std::vector<HLEModule> g_module_db; 14static std::vector<ModuleDef> g_module_db;
15 15
16void RegisterModule(const char *name, int num_functions, const HLEFunction *func_table) { 16void RegisterModule(std::string name, int num_functions, const FunctionDef* func_table) {
17 HLEModule module = {name, num_functions, func_table}; 17 ModuleDef module = {name, num_functions, func_table};
18 g_module_db.push_back(module); 18 g_module_db.push_back(module);
19} 19}
20 20
diff --git a/src/core/hle/hle.h b/src/core/hle/hle.h
index 6648c787f..35c8a4621 100644
--- a/src/core/hle/hle.h
+++ b/src/core/hle/hle.h
@@ -9,29 +9,31 @@
9 9
10//////////////////////////////////////////////////////////////////////////////////////////////////// 10////////////////////////////////////////////////////////////////////////////////////////////////////
11 11
12typedef void (*HLEFunc)(); 12#define PARAM(n) Core::g_app_core->GetReg(n)
13#define RETURN(n) Core::g_app_core->SetReg(0, n)
14
15////////////////////////////////////////////////////////////////////////////////////////////////////
16
17namespace HLE {
13 18
14struct HLEFunction { 19typedef void (*Func)();
20
21struct FunctionDef {
15 u32 id; 22 u32 id;
16 HLEFunc func; 23 Func func;
17 const char* name; 24 std::string name;
18}; 25};
19 26
20struct HLEModule { 27struct ModuleDef {
21 const char* name; 28 std::string name;
22 int num_funcs; 29 int num_funcs;
23 const HLEFunction* func_table; 30 const FunctionDef* func_table;
24}; 31};
25 32
26#define PARAM(n) Core::g_app_core->GetReg(n)
27#define RETURN(n) Core::g_app_core->SetReg(0, n)
28
29namespace HLE {
30
31void Init(); 33void Init();
32 34
33void Shutdown(); 35void Shutdown();
34 36
35void RegisterModule(const char *name, int num_functions, const HLEFunction *func_table); 37void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table);
36 38
37} // namespace 39} // namespace
diff --git a/src/core/hle/hle_syscall.cpp b/src/core/hle/hle_syscall.cpp
index b17a2e220..fdcaa914f 100644
--- a/src/core/hle/hle_syscall.cpp
+++ b/src/core/hle/hle_syscall.cpp
@@ -15,10 +15,10 @@ Result SVC_ConnectToPort(void* out, const char* port_name) {
15 return 0; 15 return 0;
16} 16}
17 17
18const HLEFunction SysCallTable[] = { 18const HLE::FunctionDef SysCall_Table[] = {
19 {0x2D, WrapI_VC<SVC_ConnectToPort>, "svcConnectToPort"}, 19 {0x2D, WrapI_VC<SVC_ConnectToPort>, "svcConnectToPort"},
20}; 20};
21 21
22void Register_SysCall() { 22void Register_SysCall() {
23 HLE::RegisterModule("SysCallTable", ARRAY_SIZE(SysCallTable), SysCallTable); 23 HLE::RegisterModule("SysCallTable", ARRAY_SIZE(SysCall_Table), SysCall_Table);
24} 24}
diff --git a/src/core/hle/hle_syscall.h b/src/core/hle/hle_syscall.h
index 643af0bf4..4faa14535 100644
--- a/src/core/hle/hle_syscall.h
+++ b/src/core/hle/hle_syscall.h
@@ -34,7 +34,4 @@
34// } 34// }
35//}; 35//};
36 36
37
38
39
40void Register_SysCall(); 37void Register_SysCall();