mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
move module initialization into a module manager, still has some issues like stopping not working and debug crashing add #idef 0 to modules that aren't in the windows project don't double initialize and don't de-initialize for now, since many modules don't expect it and it leads to many errors remove duplicate module lists for empty modules and implemented ones, make Module non-copyable but movable add secondary project, no real use for it now add some memleak config to the emucore and add asmjit path to rpcs3 small rebase error fixed to get it to compile again add filters for emucore re-add the module manager and static file WIP commit, linker errors abound some more abstraction layer stuff fix the remaining linker errors, re-enable platform specific mouse, pad and keyboard handlers rebasing fix memset undefined and re() usage of se_t before declaration Add wxGUI define by default for cmake builds fix copy constructors of Datetime header fix copy constructors of other wx interface classes remove static declarations of global variables make wxGLCanvas constructor non-ambiguous even with wx2.8. compat mode, fix wrong std::exception constructor calls remove duplicate definition for FromUTF8 and ToUTF8 temp changes
28 lines
627 B
C++
28 lines
627 B
C++
#pragma once
|
|
#include "Modules.h"
|
|
|
|
class ModuleManager
|
|
{
|
|
Module* m_modules[3][0xff];
|
|
uint m_max_module_id;
|
|
uint m_module_2_count;
|
|
std::mutex m_funcs_lock;
|
|
std::vector<ModuleFunc *> m_modules_funcs_list;
|
|
std::vector<Module> m_mod_init;
|
|
bool initialized;
|
|
public:
|
|
ModuleManager();
|
|
~ModuleManager();
|
|
|
|
void init();
|
|
void AddFunc(ModuleFunc *func);
|
|
void SetModule(int id, Module* module, bool with_data);
|
|
bool IsLoadedFunc(u32 id);
|
|
bool CallFunc(u32 num);
|
|
bool UnloadFunc(u32 id);
|
|
void UnloadModules();
|
|
u32 GetFuncNumById(u32 id);
|
|
Module* GetModuleByName(const std::string& name);
|
|
Module* GetModuleById(u16 id);
|
|
|
|
}; |