示例#1
0
        private static void ParseReturnCodeValue(int ret)
        {
            PHYSFS_ErrorCode errorCode = (PHYSFS_ErrorCode)ret;

            if (errorCode != PHYSFS_ErrorCode.PHYSFS_ERR_OK)
            {
                throw new PhysFSException(errorCode);
            }
        }
示例#2
0
 public PhysFSException(PHYSFS_ErrorCode errorCode) : base($"[{errorCode}] {Marshal.PtrToStringAnsi(Interop.PHYSFS_getErrorByCode(errorCode))}")
 {
     ErrorCode = errorCode;
 }
示例#3
0
 public static extern void PHYSFS_setErrorCode(PHYSFS_ErrorCode code); //
示例#4
0
 public static extern IntPtr PHYSFS_getErrorByCode(PHYSFS_ErrorCode code); // IntPtr => const char*;