Esempio n. 1
0
        public static void DoGBPrefsDialog(MainForm 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 (dlg.ShowDialog(mainForm) == DialogResult.OK)
            {
                dlg.gbPrefControl1.GetSettings(out s, out ss);
                gb.PutSettings(s);
                if (dlg.gbPrefControl1.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }
Esempio n. 2
0
        public static void DoGBPrefsDialog(IWin32Window owner)
        {
            var gb = (Gameboy)Global.Emulator;
            var s  = gb.GetSettings();
            var ss = gb.GetSyncSettings();

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