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,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;

View File

@ -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
{
/**

View File

@ -20,7 +20,7 @@
#include <sourcehook/sourcehook.h>
#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; \