- made sysCallbacks a value variable instead of a pointer to simplify the checks for it.
This commit is contained in:
parent
1b3ef19100
commit
ff62d7a8a3
20 changed files with 34 additions and 35 deletions
|
|
@ -137,7 +137,7 @@ void D_PostEvent(event_t* ev)
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (sysCallbacks && sysCallbacks->DispatchEvent && sysCallbacks->DispatchEvent(ev))
|
||||
if (sysCallbacks.DispatchEvent && sysCallbacks.DispatchEvent(ev))
|
||||
return;
|
||||
|
||||
events[eventhead] = *ev;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "i_interface.h"
|
||||
|
||||
// Some global engine variables taken out of the backend code.
|
||||
SystemCallbacks *sysCallbacks;
|
||||
SystemCallbacks sysCallbacks;
|
||||
FString endoomName;
|
||||
bool batchrun;
|
||||
float menuBlurAmount;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct SystemCallbacks
|
|||
bool (*DispatchEvent)(event_t* ev);
|
||||
};
|
||||
|
||||
extern SystemCallbacks *sysCallbacks;
|
||||
extern SystemCallbacks sysCallbacks;
|
||||
|
||||
struct WadStuff
|
||||
{
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ uint8_t TransmitBuffer[TRANSMIT_SIZE];
|
|||
|
||||
FString GetPlayerName(int num)
|
||||
{
|
||||
if (sysCallbacks && sysCallbacks->GetPlayerName) return sysCallbacks->GetPlayerName(sendplayer[num]);
|
||||
if (sysCallbacks.GetPlayerName) return sysCallbacks.GetPlayerName(sendplayer[num]);
|
||||
else return FStringf("Player %d", sendplayer[num] + 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue