Пример #1
0
        public static void DoGBPrefsDialog(IMainFormForConfig mainForm, Config config, IGameInfo game, IMovieSession movieSession, Gameboy gb)
        {
            var s  = gb.GetSettings();
            var ss = gb.GetSyncSettings();

            using var dlg = new GBPrefs(mainForm.DialogController);
            dlg.gbPrefControl1.PutSettings(config, game, movieSession, s, ss);
            dlg.gbPrefControl1.ColorGameBoy = gb.IsCGBMode() && (!gb.IsCGBDMGMode() || ss.EnableBIOS);
            if (mainForm.ShowDialogAsChild(dlg).IsOk())
            {
                dlg.gbPrefControl1.GetSettings(out s, out ss);
                gb.PutSettings(s);
                if (dlg.gbPrefControl1.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }
Пример #2
0
        public static void DoGBPrefsDialog(IMainFormForConfig mainForm, Gameboy gb)
        {
            var s  = gb.GetSettings();
            var ss = gb.GetSyncSettings();

            using var dlg = new GBPrefs();
            dlg.gbPrefControl1.PutSettings(s, ss);
            dlg.gbPrefControl1.ColorGameBoy = gb.IsCGBMode();
            if (mainForm.ShowDialogAsChild(dlg) == DialogResult.OK)
            {
                dlg.gbPrefControl1.GetSettings(out s, out ss);
                gb.PutSettings(s);
                if (dlg.gbPrefControl1.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }