Exemplo n.º 1
0
        public static void LOAD_GAME_DONE()
        {
            if (DisableRTC)
            {
                return;
            }

            //RTC_HellgenieEngine.ClearCheats();
            //RTC_PipeEngine.ClearPipes();

            //Glitch Harvester warning for archives

            string uppercaseFilename = GlobalWin.MainForm.CurrentlyOpenRom.ToUpper();

            if (RTC_Core.ghForm.Visible && (uppercaseFilename.Contains(".ZIP") || uppercaseFilename.Contains(".7Z")))
            {
                MessageBox.Show($"The rom {RTC_Extensions.getShortFilenameFromPath(uppercaseFilename)} is in an archive and can't be added to a Stockpile");
            }

            //Load Game vars into RTC_Core
            PathEntry pathEntry = Global.Config.PathEntries[Global.Game.System, "Savestates"] ??
                                  Global.Config.PathEntries[Global.Game.System, "Base"];

            RTC_StockpileManager.currentGameSystem = RTC_Core.EmuFolderCheck(pathEntry.SystemDisplayName);
            RTC_StockpileManager.currentGameName   = PathManager.FilesystemSafeName(Global.Game);
            RTC_Core.lastOpenRom = GlobalWin.MainForm.CurrentlyOpenRom;
            RTC_RPC.RefreshPlugin();


            //prepare memory domains in advance on bizhawk side
            RTC_MemoryDomains.RefreshDomains(false);


            if (RTC_StockpileManager.currentGameName != lastGameName)
            {
                RTC_Core.SendCommandToRTC(new RTC_Command(CommandType.REMOTE_EVENT_LOADGAMEDONE_NEWGAME));
            }
            else
            {
                RTC_Core.SendCommandToRTC(new RTC_Command(CommandType.REMOTE_EVENT_LOADGAMEDONE_SAMEGAME));
            }



            lastGameName = RTC_StockpileManager.currentGameName;

            //RTC_Restore.SaveRestore();

            RTC_NetCore.HugeOperationEnd();
        }
Exemplo n.º 2
0
        public static void LOAD_GAME_DONE()
        {
            if (!RTC_Core.isLoaded)
            {
                return;
            }

            if (RTC_Core.currentGameName == lastGameName)
            {
                RTC_MemoryZones.RefreshAndKeepDomains();
            }

            RTC_HellgenieEngine.ClearCheats();


            //Load Game vars into RTC_Core
            PathEntry pathEntry = Global.Config.PathEntries[Global.Game.System, "Savestates"] ??
                                  Global.Config.PathEntries[Global.Game.System, "Base"];

            RTC_Core.currentGameSystem = RTC_Core.EmuFolderCheck(pathEntry.SystemDisplayName);
            RTC_Core.currentGameName   = PathManager.FilesystemSafeName(Global.Game);
            RTC_Core.lastOpenRom       = GlobalWin.MainForm.CurrentlyOpenRom;
            RTC_RPC.RefreshPlugin();

            if (RTC_Core.currentGameName != lastGameName)
            {
                RTC_TimeStack.Reset();
                RTC_MemoryZones.AutoSelectDomains();
            }

            if (RTC_MemoryZones.pendingSelectedDomains != null)
            {
                RTC_MemoryZones.setSelectedDomains(RTC_MemoryZones.pendingSelectedDomains);
                RTC_MemoryZones.pendingSelectedDomains = null;
            }
            lastGameName = RTC_Core.currentGameName;

            //RTC_Restore.SaveRestore();

            RTC_RPC.SendToKillSwitch("UNFREEZE");
        }