Example #1
0
        public byte[] ReadSaveRam()
        {
            if (disposed)
            {
                throw new ObjectDisposedException(this.GetType().ToString());
            }
            if (!LibMeteor.libmeteor_hassaveram())
            {
                return(null);
            }
            IntPtr data = IntPtr.Zero;
            uint   size = 0;

            if (!LibMeteor.libmeteor_savesaveram(ref data, ref size))
            {
                throw new Exception("libmeteor_savesaveram() returned false!");
            }
            byte[] ret = new byte[size];
            Marshal.Copy(data, ret, 0, (int)size);
            LibMeteor.libmeteor_savesaveram_destroy(data);
            return(ret);
        }
Example #2
0
        public byte[] CloneSaveRam()
        {
            throw new Exception("This needs to be fixed to match the VBANext Core!");
#if false
            if (disposed)
            {
                throw new ObjectDisposedException(this.GetType().ToString());
            }
            if (!LibMeteor.libmeteor_hassaveram())
            {
                return(null);
            }
            IntPtr data = IntPtr.Zero;
            uint   size = 0;
            if (!LibMeteor.libmeteor_savesaveram(ref data, ref size))
            {
                throw new Exception("libmeteor_savesaveram() returned false!");
            }
            byte[] ret = new byte[size];
            Marshal.Copy(data, ret, 0, (int)size);
            LibMeteor.libmeteor_savesaveram_destroy(data);
            return(ret);
#endif
        }