Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 public PhysFSException(PHYSFS_ErrorCode errorCode) : base($"[{errorCode}] {Marshal.PtrToStringAnsi(Interop.PHYSFS_getErrorByCode(errorCode))}")
 {
     ErrorCode = errorCode;
 }
Exemplo n.º 3
0
 public static extern void PHYSFS_setErrorCode(PHYSFS_ErrorCode code); //
Exemplo n.º 4
0
 public static extern IntPtr PHYSFS_getErrorByCode(PHYSFS_ErrorCode code); // IntPtr => const char*;