Skip to content

Commit

Permalink
Fixed compilation on platforms using SDL window management take#3 (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Nov 27, 2010
1 parent 3ed8a40 commit 063b047
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions doomsday/engine/unix/src/dd_uinit.c
Expand Up @@ -91,8 +91,9 @@ static lt_dlhandle* findFirstUnusedPluginHandle(application_t* app)
*
* @return @c true, if the plugin was loaded succesfully.
*/
static boolean loadPlugin(const char* pluginPath, lt_ptr data)
static int loadPlugin(const char* pluginPath, lt_ptr data)
{
application_t* app = (application_t*) data;
#ifndef MACOSX
filename_t name;
#endif
Expand All @@ -110,9 +111,9 @@ static boolean loadPlugin(const char* pluginPath, lt_ptr data)
return false;

if(NULL == (initializer = lt_dlsym(plugin, "DP_Initialize")) ||
NULL == (handle = findFirstUnusedPluginHandle()))
NULL == (handle = findFirstUnusedPluginHandle(app)))
{
Con_Printf("loadPlugin: Error loading \"%s\" (%s)!\n", pluginPath, dlerror());
Con_Printf("loadPlugin: Error loading \"%s\" (%s)!\n", pluginPath, lt_dlerror());
lt_dlclose(plugin);
return false;
}
Expand All @@ -132,7 +133,7 @@ static boolean unloadPlugin(lt_dlhandle* handle)
int result = lt_dlclose(*handle);
*handle = 0;
if(result != 0)
Con_Printf("unloadPlugin: Error unloading plugin (%s)\n", dlerror());
Con_Printf("unloadPlugin: Error unloading plugin (%s)\n", lt_dlerror());
return result;
}
}
Expand All @@ -144,7 +145,7 @@ static boolean loadAllPlugins(application_t* app)
{
assert(app);
// Try to load all libraries that begin with libdp.
lt_dlforeachfile(NULL, loadPlugin, NULL);
lt_dlforeachfile(NULL, loadPlugin, (lt_ptr) app);
return true;
}

Expand Down

0 comments on commit 063b047

Please sign in to comment.