diff --git a/sourcemm/CPlugin.cpp b/sourcemm/CPlugin.cpp index eeade11..238ef6c 100644 --- a/sourcemm/CPlugin.cpp +++ b/sourcemm/CPlugin.cpp @@ -94,11 +94,10 @@ void CPluginManager::SetAllLoaded() { if ( (*i) && (*i)->m_Status == Pl_Running && (*i)->m_API ) { - //004 is when we added this callback - if ( (*i)->m_API->GetApiVersion() >= 004 ) - { - (*i)->m_API->AllPluginsLoaded(); - } + //API 4 is when we added this callback + //Min version is now 5, so we ignore this check + //if ( (*i)->m_API->GetApiVersion() >= 004 ) + (*i)->m_API->AllPluginsLoaded(); } } } @@ -243,9 +242,10 @@ CPluginManager::CPlugin *CPluginManager::_Load(const char *file, PluginId source pl->m_Status = Pl_Running; if (m_AllLoaded) { - //API 004 is when we added this callback - if (pl->m_API->GetApiVersion() >= 4) - pl->m_API->AllPluginsLoaded(); + //API 4 is when we added this callback + //Removing this code as the min version is now 5 + //if (pl->m_API->GetApiVersion() >= 4) + pl->m_API->AllPluginsLoaded(); } } else { pl->m_Status = Pl_Refused; diff --git a/sourcemm/CPlugin.h b/sourcemm/CPlugin.h index ff2cd4e..2903436 100644 --- a/sourcemm/CPlugin.h +++ b/sourcemm/CPlugin.h @@ -21,6 +21,17 @@ #include "IPluginManager.h" #include "oslink.h" +/** + * History of plugin versions: (M=min, C=current) + * 1: Initial interface + * 2: Added GetLogTag() + * 3: Moved GetApiVersion() to top (2005-04-16) + * 4: Added AllPluginsLoaded() callback (2005-04-18) + * MC 5: Bumped version for SourceHook V4 (2005-05-01) + */ + +#define PLAPI_MIN_VERSION 5 + namespace SourceMM { /** diff --git a/sourcemm/ISmmPlugin.h b/sourcemm/ISmmPlugin.h index b3951fe..d03ab36 100644 --- a/sourcemm/ISmmPlugin.h +++ b/sourcemm/ISmmPlugin.h @@ -20,7 +20,7 @@ #include #include "ISmmAPI.h" -#define PLAPI_VERSION 004 +#define PLAPI_VERSION 5 #define PLAPI_NAME "ISmmPlugin" struct factories @@ -109,7 +109,6 @@ public: #define PL_EXPOSURE CreateInterface #define PL_EXPOSURE_C "CreateInterface" -#define PLAPI_MIN_VERSION 002 #define PLUGIN_EXPOSE(name, var) \ ISmmAPI *g_SMAPI = NULL; \