Skip to content

Commit

Permalink
RMG-Core: remove usage of PluginConfig2HasRomConfig()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Feb 27, 2025
1 parent 1db6a57 commit 1624b1a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
4 changes: 1 addition & 3 deletions Source/RMG-Core/Plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,7 @@ CORE_EXPORT bool CorePluginsHasROMConfig(CorePluginType type)

plugin = get_plugin(type);

return plugin->Config2 != nullptr &&
plugin->Config2HasRomConfig != nullptr &&
plugin->Config2HasRomConfig() > 0;
return plugin->Config2 != nullptr;
}

CORE_EXPORT bool CorePluginsOpenROMConfig(CorePluginType type, void* parent, std::filesystem::path file)
Expand Down
2 changes: 0 additions & 2 deletions Source/RMG-Core/m64p/PluginApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ bool PluginApi::Hook(m64p_dynlib_handle handle)
HOOK_FUNC(handle, Plugin, Shutdown);
HOOK_FUNC_OPT(handle, Plugin, Config);
HOOK_FUNC_OPT(handle, Plugin, Config2);
HOOK_FUNC_OPT(handle, Plugin, Config2HasRomConfig);
HOOK_FUNC(handle, Plugin, GetVersion);

this->handle = handle;
Expand All @@ -43,7 +42,6 @@ bool PluginApi::Unhook(void)
UNHOOK_FUNC(Plugin, Shutdown);
UNHOOK_FUNC(Plugin, Config);
UNHOOK_FUNC(Plugin, Config2);
UNHOOK_FUNC(Plugin, Config2HasRomConfig);
UNHOOK_FUNC(Plugin, GetVersion);

this->handle = nullptr;
Expand Down
1 change: 0 additions & 1 deletion Source/RMG-Core/m64p/PluginApi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class PluginApi
ptr_PluginShutdown Shutdown;
ptr_PluginConfig Config;
ptr_PluginConfig2 Config2;
ptr_PluginConfig2HasRomConfig Config2HasRomConfig;
ptr_PluginGetVersion GetVersion;

private:
Expand Down
11 changes: 0 additions & 11 deletions Source/RMG-Core/m64p/api/m64p_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ typedef m64p_error (*ptr_PluginConfig2)(void*, int, CoreRomHeader*, CoreRomSetti
EXPORT m64p_error CALL PluginConfig2(void*, int, CoreRomHeader*, CoreRomSettings*);
#endif

/* PluginConfig2HasRomConfig(void)
*
* This optional function returns wether the plugin supports ROM specific config
* using PluginConfig2
*
*/
typedef int (*ptr_PluginConfig2HasRomConfig)(void);
#if defined(M64P_PLUGIN_PROTOTYPES) || defined(M64P_CORE_PROTOTYPES)
EXPORT int CALL PluginConfig2HasRomConfig(void);
#endif

#endif // __cplusplus

#ifdef __cplusplus
Expand Down

0 comments on commit 1624b1a

Please sign in to comment.