mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- fix compiling on Linux/et-al
This commit is contained in:
parent
942acc04c1
commit
b7cb878ad8
3 changed files with 6 additions and 6 deletions
|
@ -145,9 +145,9 @@ FBaseCVar::~FBaseCVar ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FBaseCVar::SetCallback(void *callback)
|
void FBaseCVar::SetCallback(void (*callback)(FBaseCVar&))
|
||||||
{
|
{
|
||||||
m_Callback = reinterpret_cast<void (__cdecl *)(FBaseCVar &)>(callback);
|
m_Callback = callback;
|
||||||
m_UseCallback = true;
|
m_UseCallback = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ public:
|
||||||
ToggleMessages[1] = on;
|
ToggleMessages[1] = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCallback(void *callback);
|
void SetCallback(void (*callback)(FBaseCVar&));
|
||||||
void ClearCallback();
|
void ClearCallback();
|
||||||
|
|
||||||
void SetExtraDataPointer(void *pointer);
|
void SetExtraDataPointer(void *pointer);
|
||||||
|
|
|
@ -1534,17 +1534,17 @@ class GLDefsParser
|
||||||
ECVarType cvartype = CVAR_Dummy;
|
ECVarType cvartype = CVAR_Dummy;
|
||||||
int cvarflags = CVAR_MOD|CVAR_ARCHIVE|CVAR_VIRTUAL;
|
int cvarflags = CVAR_MOD|CVAR_ARCHIVE|CVAR_VIRTUAL;
|
||||||
FBaseCVar *cvar;
|
FBaseCVar *cvar;
|
||||||
void* callback = NULL;
|
void (*callback)(FBaseCVar&) = NULL;
|
||||||
FString cvarname;
|
FString cvarname;
|
||||||
switch (parsedType)
|
switch (parsedType)
|
||||||
{
|
{
|
||||||
case PostProcessUniformType::Int:
|
case PostProcessUniformType::Int:
|
||||||
cvartype = CVAR_Int;
|
cvartype = CVAR_Int;
|
||||||
callback = uniform_callback_int;
|
callback = (void (*)(FBaseCVar&))uniform_callback_int;
|
||||||
break;
|
break;
|
||||||
case PostProcessUniformType::Float:
|
case PostProcessUniformType::Float:
|
||||||
cvartype = CVAR_Float;
|
cvartype = CVAR_Float;
|
||||||
callback = uniform_callback_float;
|
callback = (void (*)(FBaseCVar&))uniform_callback_float;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sc.ScriptError("'%s' not supported for CVAR uniforms!", strUniformType);
|
sc.ScriptError("'%s' not supported for CVAR uniforms!", strUniformType);
|
||||||
|
|
Loading…
Reference in a new issue