Bumped min/max api to 5:5

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%4052
This commit is contained in:
David Anderson 2005-05-01 18:24:48 +00:00
parent e175a7db5c
commit 4891e2a1cd
3 changed files with 20 additions and 10 deletions

View File

@ -94,14 +94,13 @@ void CPluginManager::SetAllLoaded()
{ {
if ( (*i) && (*i)->m_Status == Pl_Running && (*i)->m_API ) if ( (*i) && (*i)->m_Status == Pl_Running && (*i)->m_API )
{ {
//004 is when we added this callback //API 4 is when we added this callback
if ( (*i)->m_API->GetApiVersion() >= 004 ) //Min version is now 5, so we ignore this check
{ //if ( (*i)->m_API->GetApiVersion() >= 004 )
(*i)->m_API->AllPluginsLoaded(); (*i)->m_API->AllPluginsLoaded();
} }
} }
} }
}
bool CPluginManager::Pause(PluginId id, char *error, size_t maxlen) bool CPluginManager::Pause(PluginId id, char *error, size_t maxlen)
{ {
@ -243,8 +242,9 @@ CPluginManager::CPlugin *CPluginManager::_Load(const char *file, PluginId source
pl->m_Status = Pl_Running; pl->m_Status = Pl_Running;
if (m_AllLoaded) if (m_AllLoaded)
{ {
//API 004 is when we added this callback //API 4 is when we added this callback
if (pl->m_API->GetApiVersion() >= 4) //Removing this code as the min version is now 5
//if (pl->m_API->GetApiVersion() >= 4)
pl->m_API->AllPluginsLoaded(); pl->m_API->AllPluginsLoaded();
} }
} else { } else {

View File

@ -21,6 +21,17 @@
#include "IPluginManager.h" #include "IPluginManager.h"
#include "oslink.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 namespace SourceMM
{ {
/** /**

View File

@ -20,7 +20,7 @@
#include <sourcehook/sourcehook.h> #include <sourcehook/sourcehook.h>
#include "ISmmAPI.h" #include "ISmmAPI.h"
#define PLAPI_VERSION 004 #define PLAPI_VERSION 5
#define PLAPI_NAME "ISmmPlugin" #define PLAPI_NAME "ISmmPlugin"
struct factories struct factories
@ -109,7 +109,6 @@ public:
#define PL_EXPOSURE CreateInterface #define PL_EXPOSURE CreateInterface
#define PL_EXPOSURE_C "CreateInterface" #define PL_EXPOSURE_C "CreateInterface"
#define PLAPI_MIN_VERSION 002
#define PLUGIN_EXPOSE(name, var) \ #define PLUGIN_EXPOSE(name, var) \
ISmmAPI *g_SMAPI = NULL; \ ISmmAPI *g_SMAPI = NULL; \