Add g_typemap and g_idm alias

Future idm/fxm replacement
This commit is contained in:
Nekotekina 2018-10-01 20:57:08 +03:00
parent 3359e9a51b
commit 19a64e0e94
3 changed files with 16 additions and 2 deletions

View File

@ -866,3 +866,13 @@ public:
return {ptr, static_cast<T*>(ptr.get())};
}
};
#include "Utilities/typemap.h"
extern utils::typemap g_typemap;
constexpr utils::typemap* g_idm = &g_typemap;
using utils::id_new;
using utils::id_any;
using utils::id_always;

View File

@ -44,6 +44,8 @@
#include "Emu/RSX/VK/VulkanAPI.h"
#endif
utils::typemap g_typemap{nullptr};
cfg_root g_cfg;
bool g_use_rtm;
@ -52,8 +54,6 @@ std::string g_cfg_defaults;
extern atomic_t<u32> g_thread_count;
extern u64 get_system_time();
extern void ppu_load_exec(const ppu_exec_object&);
extern void spu_load_exec(const spu_exec_object&);
extern void ppu_initialize(const ppu_module&);
@ -266,6 +266,7 @@ void Emulator::Init()
idm::init();
fxm::init();
g_idm->init();
// Reset defaults, cache them
g_cfg.from_default();
@ -1381,6 +1382,7 @@ void Emulator::Stop(bool restart)
lv2_obj::cleanup();
idm::clear();
fxm::clear();
g_idm->init();
LOG_NOTICE(GENERAL, "Objects cleared...");

View File

@ -7,6 +7,8 @@
#include <memory>
#include <string>
u64 get_system_time();
enum class system_state
{
running,