- fix compiling on Linux/et-al

This commit is contained in:
Rachael Alexanderson 2022-02-01 12:36:26 -05:00
parent 942acc04c1
commit b7cb878ad8
3 changed files with 6 additions and 6 deletions

View file

@ -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;
}

View file

@ -184,7 +184,7 @@ public:
ToggleMessages[1] = on;
}
void SetCallback(void *callback);
void SetCallback(void (*callback)(FBaseCVar&));
void ClearCallback();
void SetExtraDataPointer(void *pointer);

View file

@ -1534,17 +1534,17 @@ class GLDefsParser
ECVarType cvartype = CVAR_Dummy;
int cvarflags = CVAR_MOD|CVAR_ARCHIVE|CVAR_VIRTUAL;
FBaseCVar *cvar;
void* callback = NULL;
void (*callback)(FBaseCVar&) = NULL;
FString cvarname;
switch (parsedType)
{
case PostProcessUniformType::Int:
cvartype = CVAR_Int;
callback = uniform_callback_int;
callback = (void (*)(FBaseCVar&))uniform_callback_int;
break;
case PostProcessUniformType::Float:
cvartype = CVAR_Float;
callback = uniform_callback_float;
callback = (void (*)(FBaseCVar&))uniform_callback_float;
break;
default:
sc.ScriptError("'%s' not supported for CVAR uniforms!", strUniformType);