示例#1
0
 static public int constructor(IntPtr l)
 {
     UnityEngine.SystemInfo o;
     o = new UnityEngine.SystemInfo();
     pushObject(l, o);
     return(1);
 }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.SystemInfo o;
			o=new UnityEngine.SystemInfo();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
示例#3
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.SystemInfo o;
         o = new UnityEngine.SystemInfo();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.SystemInfo o;
         o=new UnityEngine.SystemInfo();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
示例#5
0
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.SystemInfo o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.SystemInfo();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
示例#6
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.SystemInfo o;
         o = new UnityEngine.SystemInfo();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
    static int _CreateUnityEngine_SystemInfo(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                var obj = new UnityEngine.SystemInfo();
                ToLua.PushSealed(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.SystemInfo.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#8
0
 public Cubemap(int width, DefaultFormat format, TextureCreationFlags flags)
     : this(width, SystemInfo.GetGraphicsFormat(format), flags)
 {
 }
示例#9
0
 public Texture2D(int width, int height, DefaultFormat format, TextureCreationFlags flags)
     : this(width, height, SystemInfo.GetGraphicsFormat(format), flags)
 {
 }
示例#10
0
 public CustomRenderTexture(int width, int height, DefaultFormat defaultFormat)
     : this(width, height, SystemInfo.GetGraphicsFormat(defaultFormat))
 {
 }
示例#11
0
 public RenderTexture(int width, int height, int depth, DefaultFormat format)
     : this(width, height, depth, SystemInfo.GetGraphicsFormat(format))
 {
 }
示例#12
0
 public RenderTextureDescriptor(int width, int height, RenderTextureFormat colorFormat, int depthBufferBits, int mipCount)
     : this(width, height, SystemInfo.GetCompatibleFormat(GraphicsFormatUtility.GetGraphicsFormat(colorFormat, false), FormatUsage.Render), depthBufferBits, mipCount)
 {
 }
示例#13
0
 public CubemapArray(int width, int cubemapCount, DefaultFormat format, TextureCreationFlags flags)
     : this(width, cubemapCount, SystemInfo.GetGraphicsFormat(format), flags)
 {
 }
示例#14
0
 public RenderTextureDescriptor(int width, int height)
     : this(width, height, SystemInfo.GetGraphicsFormat(DefaultFormat.LDR), 0, Texture.GenerateAllMips)
 {
 }
        private static bool GetSystemInfo(StringBuilder builder)
        {
            try
            {
                SystemInfo sysInfo = new SystemInfo();
                var sysInfoProps = typeof(SystemInfo).GetProperties();
                builder.AppendLine(string.Format("### Start System Info ###")).AppendLine(Environment.NewLine);

                foreach (var prop in sysInfoProps)
                {
                    var value = prop.GetValue(sysInfo, null);
                    if (value.ToString() == SystemInfo.deviceName || value.ToString() == SystemInfo.deviceUniqueIdentifier)
                        continue;
                    DaggerfallUnity.LogMessage(string.Format("{0} | {1}", prop.Name, value));
                    builder.AppendLine(string.Format("{0} | {1} ", prop.Name, value)).AppendLine(Environment.NewLine);
                }

            }
            catch(Exception ex)
            {
                DaggerfallUnity.LogMessage(ex.Message);
                builder.AppendLine(string.Format("!!! Error in GetSystemInfo: {0} !!!", ex.Message)).AppendLine(Environment.NewLine);
            }

            return true;
        }
示例#16
0
 public SparseTexture(int width, int height, DefaultFormat format, int mipCount)
     : this(width, height, SystemInfo.GetGraphicsFormat(format), mipCount)
 {
 }
示例#17
0
            public unsafe void Init()
            {
                int apiVersion = Libretro.RetroApiVersion();
                SystemInfo info = new SystemInfo();
                Libretro.RetroGetSystemInfo(ref info);

                string coreName = Marshal.PtrToStringAnsi((IntPtr)info.library_name);
                string coreVersion = Marshal.PtrToStringAnsi((IntPtr)info.library_version);
                string validExtensions = Marshal.PtrToStringAnsi((IntPtr)info.valid_extensions);
                _requiresFullPath = info.need_fullpath;
                bool blockExtract = info.block_extract;

                Debug.Log("Core information:");
                Debug.Log("API Version: " + apiVersion);
                Debug.Log("Core Name: " + coreName);
                Debug.Log("Core Version: " + coreVersion);
                Debug.Log("Valid Extensions: " + validExtensions);
                Debug.Log("Block Extraction: " + blockExtract);
                Debug.Log("Requires Full Path: " + _requiresFullPath);

                _environment = RetroEnvironment;
                _videoRefresh = RetroVideoRefresh;
                _audioSample = RetroAudioSample;
                _audioSampleBatch = RetroAudioSampleBatch;
                _inputPoll = RetroInputPoll;
                _inputState = RetroInputState;

                Debug.Log("Setting up environment:");

                Libretro.RetroSetEnvironment(_environment);
                Libretro.RetroSetVideoRefresh(_videoRefresh);
                Libretro.RetroSetAudioSample(_audioSample);
                Libretro.RetroSetAudioSampleBatch(_audioSampleBatch);
                Libretro.RetroSetInputPoll(_inputPoll);
                Libretro.RetroSetInputState(_inputState);

                Libretro.RetroInit();
            }