mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion] Make Ion::Events::Journal optional
This commit is contained in:
@@ -53,6 +53,7 @@ enum class ShiftAlphaStatus {
|
||||
// Timeout is decremented
|
||||
Event getEvent(int * timeout);
|
||||
|
||||
#if ION_EVENTS_JOURNAL
|
||||
class Journal {
|
||||
public:
|
||||
virtual void pushEvent(Event e) = 0;
|
||||
@@ -62,6 +63,7 @@ public:
|
||||
|
||||
void replayFrom(Journal * l);
|
||||
void logTo(Journal * l);
|
||||
#endif
|
||||
|
||||
ShiftAlphaStatus shiftAlphaStatus();
|
||||
void setShiftAlphaStatus(ShiftAlphaStatus s);
|
||||
|
||||
@@ -118,6 +118,8 @@ static inline Event innerGetEvent(int * timeout) {
|
||||
}
|
||||
}
|
||||
|
||||
#if ION_EVENTS_JOURNAL
|
||||
|
||||
static Journal * sSourceJournal = nullptr;
|
||||
static Journal * sDestinationJournal = nullptr;
|
||||
void replayFrom(Journal * l) { sSourceJournal = l; }
|
||||
@@ -138,6 +140,14 @@ Event getEvent(int * timeout) {
|
||||
return e;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Event getEvent(int * timeout) {
|
||||
return innerGetEvent(timeout);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ ion_simulator_assets_paths = $(add_prefix ion/src/simulator/assets/,$(ion_simula
|
||||
include ion/src/simulator/$(TARGET)/Makefile
|
||||
include ion/src/simulator/external/Makefile
|
||||
|
||||
SFLAGS += -DION_EVENTS_JOURNAL
|
||||
|
||||
ifeq ($(ION_SIMULATOR_FILES),1)
|
||||
ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
actions.cpp \
|
||||
|
||||
Reference in New Issue
Block a user