示例#1
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;

            Console.WriteLine("Core information:");
            Console.WriteLine("API Version: " + _apiVersion);
            Console.WriteLine("Core Name: " + _coreName);
            Console.WriteLine("Core Version: " + _coreVersion);
            Console.WriteLine("Valid Extensions: " + _validExtensions);
            Console.WriteLine("Block Extraction: " + _blockExtract);
            Console.WriteLine("Requires Full Path: " + requiresFullPath);

            _environment      = new Libretro.RetroEnvironmentDelegate(RetroEnvironment);
            _videoRefresh     = new Libretro.RetroVideoRefreshDelegate(RetroVideoRefresh);
            _audioSample      = new Libretro.RetroAudioSampleDelegate(RetroAudioSample);
            _audioSampleBatch = new Libretro.RetroAudioSampleBatchDelegate(RetroAudioSampleBatch);
            _inputPoll        = new Libretro.RetroInputPollDelegate(RetroInputPoll);
            _inputState       = new Libretro.RetroInputStateDelegate(RetroInputState);

            Console.WriteLine("\nSetting up environment:");

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

            Libretro.RetroInit();
        }
示例#2
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();
            }
示例#3
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();
            }