Browse Source

Added Joe Jone's fix for error boxes

master
nebogeo 22 years ago
parent
commit
9e7cd28585
1 changed files with 19 additions and 4 deletions
  1. +19
    -4
      SpiralSound/PluginManager.C

+ 19
- 4
SpiralSound/PluginManager.C View File

@@ -47,15 +47,30 @@ PluginID PluginManager::LoadPlugin(const char *PluginName)
return PluginError;
}
// Link the neccesary functions
// Link the neccesary functions
char *error;
NewPlugin->CreateInstance = (SpiralPlugin*(*)()) dlsym(NewPlugin->Handle, "CreateInstance");
if ((error = dlerror()) != NULL)
{
SpiralInfo::Alert("Error linking to plugin "+string(PluginName)+"\n"+string(error));
return PluginError;
}
NewPlugin->GetIcon = (char **(*)()) dlsym(NewPlugin->Handle, "GetIcon");

if ((error = dlerror()) != NULL)
{
SpiralInfo::Alert("Error linking to plugin "+string(PluginName)+"\n"+string(error));
return PluginError;
}

NewPlugin->GetID = (int(*)()) dlsym(NewPlugin->Handle, "GetID");
char *error;
if ((error = dlerror()) != NULL)
{
SpiralInfo::Alert("Error linking to plugin: \n"+string(error));
SpiralInfo::Alert("Error linking to plugin "+string(PluginName)+"\n"+string(error));
return PluginError;
}


Loading…
Cancel
Save