From 3bd041f5b0cd481ded892594d569462492679e39 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 10 Apr 2014 22:15:07 -0400 Subject: [PATCH] changed some naming/misc cleanups --- src/core/hle.cpp | 6 +++--- src/core/hle/hle.h | 32 +++++++++++++++++--------------- src/core/hle/hle_syscall.cpp | 4 ++-- src/core/hle/hle_syscall.h | 3 --- 4 files changed, 22 insertions(+), 23 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 @@ namespace HLE { -static std::vector g_module_db; +static std::vector 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 6648c787f..35c8a4621 100644 --- a/src/core/hle/hle.h +++ b/src/core/hle/hle.h @@ -9,29 +9,31 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef void (*HLEFunc)(); - -struct HLEFunction { - u32 id; - HLEFunc func; - const char* name; -}; - -struct HLEModule { - const char* name; - int num_funcs; - const HLEFunction* func_table; -}; - #define PARAM(n) Core::g_app_core->GetReg(n) #define RETURN(n) Core::g_app_core->SetReg(0, n) +//////////////////////////////////////////////////////////////////////////////////////////////////// + namespace HLE { +typedef void (*Func)(); + +struct FunctionDef { + u32 id; + Func func; + std::string name; +}; + +struct ModuleDef { + std::string name; + int num_funcs; + const FunctionDef* func_table; +}; + 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 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) { return 0; } -const HLEFunction SysCallTable[] = { +const HLE::FunctionDef SysCall_Table[] = { {0x2D, WrapI_VC, "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 643af0bf4..4faa14535 100644 --- a/src/core/hle/hle_syscall.h +++ b/src/core/hle/hle_syscall.h @@ -34,7 +34,4 @@ // } //}; - - - void Register_SysCall();