Ejemplo n.º 1
0
        public void LoadRom(string path)
        {
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
            // If the file doesn't exist the application gets stuck in a loop.
            if (!File.Exists(path))
            {
                Debug.LogError(path + " not found.");
                return;
            }
#endif
            Display.material.color = Color.white;

            wrapper = new LibretroWrapper.Wrapper(CoreName);

            wrapper.Init();
            wrapper.LoadGame(path);
        }
Ejemplo n.º 2
0
        public void LoadRom(string path)
        {
            #if !UNITY_ANDROID || UNITY_EDITOR
            // Doesn't work on Android because you can't do File.Exists in StreamingAssets folder.
            // Should figure out a different way to perform check later.
            // If the file doesn't exist the application gets stuck in a loop.
            if (!File.Exists(path)) {
                Debug.LogError(path + " not found.");
                return;
            }
            #endif
            Display.material.color = Color.white;

            wrapper = new LibretroWrapper.Wrapper(Application.streamingAssetsPath + "/" + CoreName);

            wrapper.Init();
            wrapper.LoadGame(path);
        }
Ejemplo n.º 3
0
        public void LoadRom(string romPath, string corePath = "")
        {
            if (gameLoaded)
            {
                unloadROM();
            }

            RAMPath   = romPath.Substring(0, romPath.LastIndexOf('.'));
            STATEPath = RAMPath + ".state";
            RAMPath  += ".srm";
            STATEPath = STATEPath.Insert(STATEPath.LastIndexOf("/"), "/SaveStates");
            RAMPath   = RAMPath.Insert(RAMPath.LastIndexOf("/"), "/RAMSaves");

#if !UNITY_ANDROID || UNITY_EDITOR
            // Doesn't work on Android because you can't do File.Exists in StreamingAssets folder.
            // Should figure out a different way to perform check later.
            // If the file doesn't exist the application gets stuck in a loop.
            if (!File.Exists(romPath))
            {
                Debug.LogError(romPath + " not found.");
                return;
            }
#endif
            Display.material.color = Color.white;

            if (corePath == "")
            {
                wrapper = new LibretroWrapper.Wrapper(Application.streamingAssetsPath + "/" + CoreName);
            }
            else
            {
                wrapper = new LibretroWrapper.Wrapper(corePath);
            }

            wrapper.Init();

            bool returned = wrapper.LoadGame(romPath);
            if (RAMPath != null)
            {
                wrapper.LoadRAM(RAMPath);
            }

            gameLoaded = returned;
        }
Ejemplo n.º 4
0
        public void LoadRom(string path)
        {
#if !UNITY_ANDROID || UNITY_EDITOR
            // Doesn't work on Android because you can't do File.Exists in StreamingAssets folder.
            // Should figure out a different way to perform check later.
            // If the file doesn't exist the application gets stuck in a loop.
            if (!File.Exists(path))
            {
                Debug.LogError(path + " not found.");
                return;
            }
#endif
            Display.material.color = Color.white;

            wrapper = new LibretroWrapper.Wrapper(Application.streamingAssetsPath + "/" + CoreName);

            wrapper.Init();
            wrapper.LoadGame(path);
        }