mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Check FNID duplication
This commit is contained in:
parent
b671bb72dc
commit
24f9f06279
@ -88,12 +88,26 @@ void ppu_module_manager::register_module(ppu_static_module* module)
|
||||
|
||||
ppu_static_function& ppu_module_manager::access_static_function(const char* module, u32 fnid)
|
||||
{
|
||||
return access().at(module)->functions[fnid];
|
||||
auto& res = access().at(module)->functions[fnid];
|
||||
|
||||
if (res.name)
|
||||
{
|
||||
fmt::throw_exception("PPU FNID duplication in module %s (%s, 0x%x)", module, res.name, fnid);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
ppu_static_variable& ppu_module_manager::access_static_variable(const char* module, u32 vnid)
|
||||
{
|
||||
return access().at(module)->variables[vnid];
|
||||
auto& res = access().at(module)->variables[vnid];
|
||||
|
||||
if (res.name)
|
||||
{
|
||||
fmt::throw_exception("PPU VNID duplication in module %s (%s, 0x%x)", module, res.name, vnid);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
const ppu_static_module* ppu_module_manager::get_module(const std::string& name)
|
||||
|
Loading…
Reference in New Issue
Block a user