Created
June 22, 2009 18:11
-
-
Save julik/134103 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char *pluginSignature = "my.super.expensive.plugin"; | |
#ifdef APL | |
// Mac-specific: it IS possible to have plugin installed twice, once in the ACF folder | |
// and once in the X-System folder. Probably due to namespace mangling on OS X | |
// the system will NOT crash the app when the plugin gets loaded twice. | |
// Thus, we query the enabled plugins for the defined signatures | |
// and DO NOT activate should the other plugin already be plugged in | |
XPLM_API XPLMPluginID other_copy_id = XPLMFindPluginBySignature(pluginSignature); | |
if(-1 != other_copy_id) { | |
// Figure out where the other plugin came from | |
char pathToAnotherCopy[256]; | |
XPLMGetPluginInfo(other_copy_id, NULL, pathToAnotherCopy, NULL, NULL); | |
XPLMDebugString("another copy already loaded from \n"); | |
XPLMDebugString(pathToAnotherCopy); | |
return 0; | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment