OSDN Git Service

[VM][WIP] Pre-process to apply new state framework.Still not buildable.
[csp-qt/common_source_project-fm7.git] / source / src / vm / fmr30 / serial.cpp
index bf7e5b0..46e2f17 100644 (file)
@@ -189,3 +189,14 @@ bool SERIAL::load_state(FILEIO* state_fio)
        return true;
 }
 
+bool SERIAL::process_state(FILEIO* state_fio, bool loading)
+{
+       if(!state_fio->StateCheckUint32(STATE_VERSION)) {
+               return false;
+       }
+       if(!state_fio->StateCheckInt32(this_device_id)) {
+               return false;
+       }
+       state_fio->StateBuffer(sioctrl, sizeof(sioctrl), 1);
+       return true;
+}