aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei <ericbunnie@gmail.com>2014-04-10 22:15:07 -0400
committerGravatar bunnei <ericbunnie@gmail.com>2014-04-10 22:15:07 -0400
commit3bd041f5b0cd481ded892594d569462492679e39 (patch)
tree6f4c64d1ae09983b8c4d2b8c10f3fa51bef01507 /src/core
parent2a7d7ce55d51a1cf893d14e893b87941df4a2f03 (diff)
changed some naming/misc cleanups
Diffstat (limited to 'src/core')
-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 f0c7d217..8dad7695 100644
--- a/src/core/hle.cpp
+++ b/src/core/hle.cpp
@@ -11,10 +11,10 @@
namespace HLE {
-static std::vector<HLEModule> g_module_db;
+static std::vector<ModuleDef> g_module_db;
-void RegisterModule(const char *name, int num_functions, const HLEFunction *func_table) {
- HLEModule module = {name, num_functions, func_table};
+void RegisterModule(std::string name, int num_functions, const FunctionDef* func_table) {
+ ModuleDef module = {name, num_functions, func_table};
g_module_db.push_back(module);
}
diff --git a/src/core/hle/hle.h b/src/core/hle/hle.h
index 6648c787..35c8a462 100644
--- a/src/core/hle/hle.h
+++ b/src/core/hle/hle.h
@@ -9,29 +9,31 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
-typedef void (*HLEFunc)();
+#define PARAM(n) Core::g_app_core->GetReg(n)
+#define RETURN(n) Core::g_app_core->SetReg(0, n)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace HLE {
-struct HLEFunction {
+typedef void (*Func)();
+
+struct FunctionDef {
u32 id;
- HLEFunc func;
- const char* name;
+ Func func;
+ std::string name;
};
-struct HLEModule {
- const char* name;
+struct ModuleDef {
+ std::string name;
int num_funcs;
- const HLEFunction* func_table;
+ const FunctionDef* func_table;
};
-#define PARAM(n) Core::g_app_core->GetReg(n)
-#define RETURN(n) Core::g_app_core->SetReg(0, n)
-
-namespace HLE {
-
void Init();
void Shutdown();
-void RegisterModule(const char *name, int num_functions, const HLEFunction *func_table);
+void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table);
} // namespace
diff --git a/src/core/hle/hle_syscall.cpp b/src/core/hle/hle_syscall.cpp
index b17a2e22..fdcaa914 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) {
return 0;
}
-const HLEFunction SysCallTable[] = {
+const HLE::FunctionDef SysCall_Table[] = {
{0x2D, WrapI_VC<SVC_ConnectToPort>, "svcConnectToPort"},
};
void Register_SysCall() {
- HLE::RegisterModule("SysCallTable", ARRAY_SIZE(SysCallTable), SysCallTable);
+ HLE::RegisterModule("SysCallTable", ARRAY_SIZE(SysCall_Table), SysCall_Table);
}
diff --git a/src/core/hle/hle_syscall.h b/src/core/hle/hle_syscall.h
index 643af0bf..4faa1453 100644
--- a/src/core/hle/hle_syscall.h
+++ b/src/core/hle/hle_syscall.h
@@ -34,7 +34,4 @@
// }
//};
-
-
-
void Register_SysCall();