Exemplo n.º 1
0
        public void SaveStateBinary(System.IO.BinaryWriter writer)
        {
            fixed(byte *ptr = &savebuff[0])
            {
                if (!retro.retro_serialize((IntPtr)ptr, (uint)savebuff.Length))
                {
                    throw new Exception("retro_serialize() failed");
                }
            }

            writer.Write(savebuff.Length);
            writer.Write(savebuff);
            // other variables
            writer.Write(Frame);
            writer.Write(LagCount);
            writer.Write(IsLagFrame);
        }