mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
Added error field to provider loading.
This commit is contained in:
parent
b86f66d459
commit
0e05b948fd
@ -15,7 +15,7 @@ struct vsp_bridge_info
|
||||
class IVspBridge
|
||||
{
|
||||
public:
|
||||
virtual bool Load(const vsp_bridge_info *info) = 0;
|
||||
virtual bool Load(const vsp_bridge_info *info, char *buffer, size_t maxlength) = 0;
|
||||
virtual void Unload() = 0;
|
||||
virtual const char *GetDescription() = 0;
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include "loader.h"
|
||||
@ -133,7 +134,7 @@ public:
|
||||
if (get_bridge == NULL)
|
||||
{
|
||||
mm_UnloadMetamodLibrary();
|
||||
mm_LogFatal("Detected engine %d but could not find GetVspBridge callback.");
|
||||
mm_LogFatal("Detected engine %d but could not find GetVspBridge callback.", backend);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -146,9 +147,11 @@ public:
|
||||
info.vsp_callbacks = (IServerPluginCallbacks*)this;
|
||||
info.vsp_version = vsp_version;
|
||||
|
||||
if (!bridge->Load(&info))
|
||||
strcpy(error, "Unknown error");
|
||||
if (!bridge->Load(&info, error, sizeof(error)))
|
||||
{
|
||||
mm_UnloadMetamodLibrary();
|
||||
mm_LogFatal("Unknown error loading Metamod for engine %d: %s", backend, error);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user