Exemple #1
0
        public static void DoDGBPrefsDialog(IWin32Window owner)
        {
            var gambatte = (GambatteLink)Global.Emulator;
            var s        = gambatte.GetSettings();
            var ss       = gambatte.GetSyncSettings();

            using (var dlg = new DGBPrefs())
            {
                dlg.PutSettings(s, ss);

                var emu = (GambatteLink)Global.Emulator;
                dlg.gbPrefControl1.ColorGameBoy = emu.IsCGBMode(false);
                dlg.gbPrefControl2.ColorGameBoy = emu.IsCGBMode(true);

                if (dlg.ShowDialog(owner) == DialogResult.OK)
                {
                    dlg.GetSettings(out s, out ss);
                    gambatte.PutSettings(s);
                    if (dlg.SyncSettingsChanged)
                    {
                        GlobalWin.MainForm.PutCoreSyncSettings(ss);
                    }
                }
            }
        }
Exemple #2
0
        public static void DoDGBPrefsDialog(IMainFormForConfig mainForm, GambatteLink gambatte)
        {
            var s  = gambatte.GetSettings();
            var ss = gambatte.GetSyncSettings();

            using var dlg = new DGBPrefs();
            dlg.PutSettings(s, ss);

            dlg.gbPrefControl1.ColorGameBoy = gambatte.IsCGBMode(false);
            dlg.gbPrefControl2.ColorGameBoy = gambatte.IsCGBMode(true);

            if (mainForm.ShowDialogAsChild(dlg) == DialogResult.OK)
            {
                dlg.GetSettings(out s, out ss);
                gambatte.PutSettings(s);
                if (dlg.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }