C64Lib.Core.Job1541.NewPrefs C# (CSharp) Method

NewPrefs() public method

public NewPrefs ( Prefs prefs ) : void
prefs Prefs
return void
        public void NewPrefs(Prefs prefs)
        {
            // 1541 emulation turned off?
            if (!prefs.Emul1541Proc)
                CloseD64File();

            // 1541 emulation turned on?
            else if (!GlobalPrefs.ThePrefs.Emul1541Proc && prefs.Emul1541Proc)
                OpenD64File(prefs.DrivePath[0], prefs.DriveData[0]);

            // .d64 file name changed?
            else if (GlobalPrefs.ThePrefs.DrivePath[0] != prefs.DrivePath[0])
            {
                CloseD64File();
                OpenD64File(prefs.DrivePath[0], prefs.DriveData[0]);
                disk_changed = true;
            }
        }