aboutsummaryrefslogtreecommitdiff
path: root/src/Savestate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Savestate.cpp')
-rw-r--r--src/Savestate.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/Savestate.cpp b/src/Savestate.cpp
index 0337ff2..ba8ffd9 100644
--- a/src/Savestate.cpp
+++ b/src/Savestate.cpp
@@ -261,6 +261,22 @@ void Savestate::Var64(u64* var)
}
}
+void Savestate::Bool32(bool* var)
+{
+ // for compability
+ if (Saving)
+ {
+ u32 val = *var;
+ Var32(&val);
+ }
+ else
+ {
+ u32 val;
+ Var32(&val);
+ *var = val != 0;
+ }
+}
+
void Savestate::VarArray(void* data, u32 len)
{
if (Error) return;
@@ -273,4 +289,4 @@ void Savestate::VarArray(void* data, u32 len)
{
fread(data, len, 1, file);
}
-}
+} \ No newline at end of file