Skip to content

Commit

Permalink
Fixed Bug where Teamspeak plugin wouldn't load. Big thanks to Dr_Eyeb…
Browse files Browse the repository at this point in the history
…all!
  • Loading branch information
dedmen committed Oct 7, 2016
1 parent d8b7729 commit fe9f54d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ts/include/ts3_functions.h
Expand Up @@ -246,7 +246,7 @@ struct TS3Functions {
void (*getAppPath)(char* path, size_t maxLen);
void (*getResourcesPath)(char* path, size_t maxLen);
void (*getConfigPath)(char* path, size_t maxLen);
void (*getPluginPath)(char* path, size_t maxLen, const char* pluginID);
void (*getPluginPath)(char* path, size_t maxLen);
uint64 (*getCurrentServerConnectionHandlerID)();
void (*printMessage)(uint64 serverConnectionHandlerID, const char* message, enum PluginMessageTarget messageTarget);
void (*printMessageToCurrentTab)(const char* message);
Expand Down
10 changes: 5 additions & 5 deletions ts/src/plugin.cpp
Expand Up @@ -2218,11 +2218,11 @@ int ts3plugin_init() {
#ifdef _WIN64
_set_FMA3_enable(0);
#endif
if (ts3plugin_apiVersion() > 20) {
ts3Functions.getPluginPath(pluginPath, PATH_BUFSIZE, pluginID);
} else { //Compatibility hack for API version < 21
typedef void(*getPluginPath_20)(char* path, size_t maxLen);
static_cast<getPluginPath_20>(static_cast<void*>(ts3Functions.getPluginPath))(pluginPath, PATH_BUFSIZE); //This is ugly but keeps compatibility
if (ts3plugin_apiVersion() <= 20) {
ts3Functions.getPluginPath(pluginPath, PATH_BUFSIZE);
} else { //Compatibility hack for API version > 21
typedef void(*getPluginPath_20)(char* path, size_t maxLen, const char* pluginID);
static_cast<getPluginPath_20>(static_cast<void*>(ts3Functions.getPluginPath))(pluginPath, PATH_BUFSIZE,pluginID); //This is ugly but keeps compatibility
}


Expand Down

0 comments on commit fe9f54d

Please sign in to comment.