VS DualSystem: Added options to select which video/audio streams to show/play

This commit is contained in:
Sour 2018-07-02 22:44:23 -04:00
parent ef489a4513
commit 2f9581ff2f
16 changed files with 260 additions and 30 deletions

View file

@ -90,6 +90,9 @@ enum EmulationFlags : uint64_t
ReduceSoundInFastForward = 0x100000000000000,
VsDualMuteMaster = 0x200000000000000,
VsDualMuteSlave = 0x400000000000000,
ForceMaxSpeed = 0x4000000000000000,
ConsoleMode = 0x8000000000000000,
};

View file

@ -116,6 +116,14 @@ void SoundMixer::PlayAudioBuffer(uint32_t time)
_oggMixer->ApplySamples(_outputBuffer, sampleCount);
}
if(_console->IsDualSystem()) {
if(_console->IsMaster() && EmulationSettings::CheckFlag(EmulationFlags::VsDualMuteMaster)) {
_lowPassFilter.ApplyFilter(_outputBuffer, sampleCount, 0, 0);
} else if(!_console->IsMaster() && EmulationSettings::CheckFlag(EmulationFlags::VsDualMuteSlave)) {
_lowPassFilter.ApplyFilter(_outputBuffer, sampleCount, 0, 0);
}
}
RewindManager* rewindManager = _console->GetRewindManager();
if(!_console->GetVideoRenderer()->IsRecording() && !_waveRecorder && !EmulationSettings::CheckFlag(EmulationFlags::NsfPlayerEnabled)) {

View file

@ -40,6 +40,9 @@ namespace Mesen.GUI.Config
public bool AssociateMstFiles = false;
public bool AssociateUnfFiles = false;
public VsDualOutputOption VsDualVideoOutput = VsDualOutputOption.Both;
public VsDualOutputOption VsDualAudioOutput = VsDualOutputOption.Both;
public bool NsfEnableApuIrqs = false;
public bool NsfMoveToNextTrackAfterTime = true;
public Int32 NsfMoveToNextTrackTime = 120;
@ -201,6 +204,9 @@ namespace Mesen.GUI.Config
InteropEmu.SetFlag(EmulationFlags.DisplayDebugInfo, preferenceInfo.DisplayDebugInfo);
InteropEmu.SetFlag(EmulationFlags.VsDualMuteMaster, preferenceInfo.VsDualAudioOutput == VsDualOutputOption.SlaveOnly);
InteropEmu.SetFlag(EmulationFlags.VsDualMuteSlave, preferenceInfo.VsDualAudioOutput == VsDualOutputOption.MasterOnly);
InteropEmu.SetAutoSaveOptions(preferenceInfo.AutoSave ? (uint)preferenceInfo.AutoSaveDelay : 0, preferenceInfo.AutoSaveNotify);
InteropEmu.ClearShortcutKeys();
@ -230,4 +236,11 @@ namespace Mesen.GUI.Config
KeyCombination = keyCombination;
}
}
public enum VsDualOutputOption
{
Both = 0,
MasterOnly = 1,
SlaveOnly = 2
}
}

View file

@ -409,6 +409,10 @@
<Control ID="lblLastSync">Darrera sincronització: </Control>
<Control ID="btnResync">Resincronitza</Control>
<Control ID="lblVsDualSystem">VS. DualSystem Settings</Control>
<Control ID="lblVsDualPlayAudio">Play audio for:</Control>
<Control ID="lblVsDualShowVideo">Show video for:</Control>
<Control ID="lblFdsSettings">Configuració de Famicom Disk System</Control>
<Control ID="lblUiDisplaySettings">Configuració de la interfície d'usuari</Control>
<Control ID="lblWindowSettings">Window Settings</Control>
@ -423,7 +427,7 @@
<Control ID="chkAlwaysOnTop">Always display on top of other windows</Control>
<Control ID="tpgFdsNfs">FDS / NSF</Control>
<Control ID="tpgFdsNfs">FDS / VS / NSF</Control>
<Control ID="lblNsfSettings">NSF Settings</Control>
<Control ID="chkNsfAutoDetectSilence">Reprodueix la següent pista després de</Control>
<Control ID="lblNsfMillisecondsOfSilence">mil·lisegons de silenci</Control>
@ -948,6 +952,11 @@
<Value ID="Prescale8x">Preescalat 8x</Value>
<Value ID="Prescale10x">Preescalat 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">Both</Value>
<Value ID="MasterOnly">Master Only</Value>
<Value ID="SlaveOnly">Slave Only</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>

View file

@ -410,6 +410,10 @@
<Control ID="lblLastSync">Last Sync:</Control>
<Control ID="btnResync">Resync</Control>
<Control ID="lblVsDualSystem">VS. DualSystem Settings</Control>
<Control ID="lblVsDualPlayAudio">Play audio for:</Control>
<Control ID="lblVsDualShowVideo">Show video for:</Control>
<Control ID="lblFdsSettings">Famicom Disk System Settings</Control>
<Control ID="lblUiDisplaySettings">UI Display Settings</Control>
<Control ID="lblWindowSettings">Window Settings</Control>
@ -424,7 +428,7 @@
<Control ID="chkAlwaysOnTop">Always display on top of other windows</Control>
<Control ID="tpgFdsNfs">FDS / NSF</Control>
<Control ID="tpgFdsNfs">FDS / VS / NSF</Control>
<Control ID="lblNsfSettings">NSF Settings</Control>
<Control ID="chkNsfAutoDetectSilence">Move to next track after</Control>
<Control ID="lblNsfMillisecondsOfSilence">milliseconds of silence</Control>
@ -982,6 +986,11 @@
<Value ID="Prescale8x">Prescale 8x</Value>
<Value ID="Prescale10x">Prescale 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">Both</Value>
<Value ID="MasterOnly">Master Only</Value>
<Value ID="SlaveOnly">Slave Only</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>

View file

@ -407,6 +407,10 @@
<Control ID="lblLastSync">Última sincronización: </Control>
<Control ID="btnResync">Resincronizar</Control>
<Control ID="lblVsDualSystem">VS. DualSystem Settings</Control>
<Control ID="lblVsDualPlayAudio">Play audio for:</Control>
<Control ID="lblVsDualShowVideo">Show video for:</Control>
<Control ID="lblFdsSettings">Configuración de Famicom Disk System</Control>
<Control ID="lblUiDisplaySettings">Configuración de interfaz de usuario</Control>
<Control ID="lblWindowSettings">Ventana de ajustes</Control>
@ -421,7 +425,7 @@
<Control ID="chkAlwaysOnTop">Mostrar siempre sobre otras ventanas</Control>
<Control ID="tpgFdsNfs">FDS / NSF</Control>
<Control ID="tpgFdsNfs">FDS / VS / NSF</Control>
<Control ID="lblNsfSettings">NSF Settings</Control>
<Control ID="chkNsfAutoDetectSilence">Reproducir la siguiente pista después</Control>
<Control ID="lblNsfMillisecondsOfSilence">milisegundos de silencio</Control>
@ -965,6 +969,11 @@
<Value ID="Prescale8x">Preescala 8x</Value>
<Value ID="Prescale10x">Preescala 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">Both</Value>
<Value ID="MasterOnly">Master Only</Value>
<Value ID="SlaveOnly">Slave Only</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>

View file

@ -409,6 +409,10 @@
<Control ID="lblLastSync">Dernière synchronisation : </Control>
<Control ID="btnResync">Resynchroniser</Control>
<Control ID="lblVsDualSystem">Options pour le Vs. DualSystem</Control>
<Control ID="lblVsDualPlayAudio">Jouer le son pour :</Control>
<Control ID="lblVsDualShowVideo">Affichage l'image pour :</Control>
<Control ID="lblFdsSettings">Options pour le Famicom Disk System</Control>
<Control ID="lblUiDisplaySettings">Options d'affichage de l'interface</Control>
<Control ID="lblWindowSettings">Options de la fenêtre</Control>
@ -423,7 +427,7 @@
<Control ID="chkAlwaysOnTop">Afficher la fenêtre au premier plan</Control>
<Control ID="tpgFdsNfs">FDS / NSF</Control>
<Control ID="tpgFdsNfs">FDS / VS / NSF</Control>
<Control ID="lblNsfSettings">Options pour les fichiers NSF</Control>
<Control ID="chkNsfAutoDetectSilence">Jouer la piste suivante après</Control>
<Control ID="lblNsfMillisecondsOfSilence">millisecondes de silence</Control>
@ -979,6 +983,11 @@
<Value ID="Prescale8x">Prescale 8x</Value>
<Value ID="Prescale10x">Prescale 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">Les deux CPUs</Value>
<Value ID="MasterOnly">CPU #1 uniquement</Value>
<Value ID="SlaveOnly">CPU #2 uniquement</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>

View file

@ -408,6 +408,10 @@
<Control ID="btnResync">同期</Control>
<Control ID="lblLastSync">最終同期: </Control>
<Control ID="lblVsDualSystem">VS.システム設定</Control>
<Control ID="lblVsDualPlayAudio">次の音声を再生する:</Control>
<Control ID="lblVsDualShowVideo">次の映像を表示する:</Control>
<Control ID="lblFdsSettings">ファミコンディスクシステム設定</Control>
<Control ID="lblUiDisplaySettings">ユーザーインターフェイス表示設定</Control>
<Control ID="lblWindowSettings">ウインドウ設定</Control>
@ -422,7 +426,7 @@
<Control ID="chkAlwaysOnTop">他のウインドウより常に手前に表示する</Control>
<Control ID="tpgFdsNfs">FDS・NSF</Control>
<Control ID="tpgFdsNfs">FDS・VS・NSF</Control>
<Control ID="lblNsfSettings">NSF設定</Control>
<Control ID="chkNsfAutoDetectSilence">無音検出:</Control>
<Control ID="lblNsfMillisecondsOfSilence">ミリ秒間で無音の場合、次の曲を再生</Control>
@ -964,6 +968,11 @@
<Value ID="Prescale8x">Prescale 8x</Value>
<Value ID="Prescale10x">Prescale 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">両方</Value>
<Value ID="MasterOnly">マスターのみ</Value>
<Value ID="SlaveOnly">スレーブのみ</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">ファミコン</Value>

View file

@ -405,6 +405,10 @@
<Control ID="lblLastSync">Última sincronização: </Control>
<Control ID="btnResync">Ressincronizar</Control>
<Control ID="lblVsDualSystem">VS. DualSystem Settings</Control>
<Control ID="lblVsDualPlayAudio">Play audio for:</Control>
<Control ID="lblVsDualShowVideo">Show video for:</Control>
<Control ID="lblFdsSettings">Configurações do Famicom Disk System</Control>
<Control ID="lblUiDisplaySettings">Configuração da interface de usuário</Control>
<Control ID="lblWindowSettings">Window Settings</Control>
@ -419,7 +423,7 @@
<Control ID="chkAlwaysOnTop">Sempre exibir em cima de outras janelas</Control>
<Control ID="tpgFdsNfs">FDS / NSF</Control>
<Control ID="tpgFdsNfs">FDS / VS / NSF</Control>
<Control ID="lblNsfSettings">NSF Settings</Control>
<Control ID="chkNsfAutoDetectSilence">Reproduzir a faixa seguinte depois de</Control>
<Control ID="lblNsfMillisecondsOfSilence">milissegundos de silêncio</Control>
@ -966,6 +970,11 @@
<Value ID="Prescale8x">Preescala 8x</Value>
<Value ID="Prescale10x">Preescala 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">Both</Value>
<Value ID="MasterOnly">Master Only</Value>
<Value ID="SlaveOnly">Slave Only</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>

View file

@ -406,6 +406,10 @@
<Control ID="lblLastSync">Последняя синхронизация : </Control>
<Control ID="btnResync">Синхронизировать</Control>
<Control ID="lblVsDualSystem">VS. DualSystem Settings</Control>
<Control ID="lblVsDualPlayAudio">Play audio for:</Control>
<Control ID="lblVsDualShowVideo">Show video for:</Control>
<Control ID="lblFdsSettings">Famicom Disk System Settings</Control>
<Control ID="lblUiDisplaySettings">UI Display Settings</Control>
<Control ID="lblWindowSettings">Window Settings</Control>
@ -420,7 +424,7 @@
<Control ID="chkAlwaysOnTop">Always display on top of other windows</Control>
<Control ID="tpgFdsNfs">FDS / NSF</Control>
<Control ID="tpgFdsNfs">FDS / VS / NSF</Control>
<Control ID="lblNsfSettings">NSF Settings</Control>
<Control ID="chkNsfAutoDetectSilence">Переходить на следующий трек после</Control>
<Control ID="lblNsfMillisecondsOfSilence">миллисекунд тишины</Control>
@ -967,6 +971,11 @@
<Value ID="Prescale8x">Prescale 8x</Value>
<Value ID="Prescale10x">Prescale 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">Both</Value>
<Value ID="MasterOnly">Master Only</Value>
<Value ID="SlaveOnly">Slave Only</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>

View file

@ -406,6 +406,10 @@
<Control ID="lblLastSync">Востаннє синхронізовано : </Control>
<Control ID="btnResync">Синхронізувати</Control>
<Control ID="lblVsDualSystem">VS. DualSystem Settings</Control>
<Control ID="lblVsDualPlayAudio">Play audio for:</Control>
<Control ID="lblVsDualShowVideo">Show video for:</Control>
<Control ID="lblFdsSettings">Famicom Disk System Налаштування</Control>
<Control ID="lblUiDisplaySettings">Налаштування дисплея інтерфейсу користувача</Control>
<Control ID="lblWindowSettings">Window Settings</Control>
@ -420,7 +424,7 @@
<Control ID="chkAlwaysOnTop">Завжди відображати поверх інших вікон</Control>
<Control ID="tpgFdsNfs">FDS / NSF</Control>
<Control ID="tpgFdsNfs">FDS / VS / NSF</Control>
<Control ID="lblNsfSettings">NSF Settings</Control>
<Control ID="chkNsfAutoDetectSilence">Відтворити наступний трек після</Control>
<Control ID="lblNsfMillisecondsOfSilence">мілісекунд тиші</Control>
@ -967,6 +971,11 @@
<Value ID="Prescale8x">Prescale 8x</Value>
<Value ID="Prescale10x">Prescale 10x</Value>
</Enum>
<Enum ID="VsDualOutputOption">
<Value ID="Both">Both</Value>
<Value ID="MasterOnly">Master Only</Value>
<Value ID="SlaveOnly">Slave Only</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>

View file

@ -85,6 +85,12 @@ namespace Mesen.GUI.Forms.Config
this.lblAutoSave = new System.Windows.Forms.Label();
this.tpgFdsNfs = new System.Windows.Forms.TabPage();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutPanel10 = new System.Windows.Forms.FlowLayoutPanel();
this.lblVsDualPlayAudio = new System.Windows.Forms.Label();
this.cboVsDualAudioOutput = new System.Windows.Forms.ComboBox();
this.flowLayoutPanel9 = new System.Windows.Forms.FlowLayoutPanel();
this.lblVsDualShowVideo = new System.Windows.Forms.Label();
this.cboVsDualVideoOutput = new System.Windows.Forms.ComboBox();
this.lblNsfSettings = new System.Windows.Forms.Label();
this.lblFdsSettings = new System.Windows.Forms.Label();
this.chkFdsAutoLoadDisk = new System.Windows.Forms.CheckBox();
@ -99,6 +105,7 @@ namespace Mesen.GUI.Forms.Config
this.nudNsfMoveToNextTrackTime = new Mesen.GUI.Controls.MesenNumericUpDown();
this.lblNsfSeconds = new System.Windows.Forms.Label();
this.chkNsfEnableApuIrqs = new Mesen.GUI.Controls.ctrlRiskyOption();
this.lblVsDualSystem = new System.Windows.Forms.Label();
this.tpgFiles = new System.Windows.Forms.TabPage();
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.grpPathOverrides = new System.Windows.Forms.GroupBox();
@ -176,6 +183,8 @@ namespace Mesen.GUI.Forms.Config
this.flpAutoSave.SuspendLayout();
this.tpgFdsNfs.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.flowLayoutPanel10.SuspendLayout();
this.flowLayoutPanel9.SuspendLayout();
this.flowLayoutPanel7.SuspendLayout();
this.flowLayoutPanel5.SuspendLayout();
this.tpgFiles.SuspendLayout();
@ -871,18 +880,21 @@ namespace Mesen.GUI.Forms.Config
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.lblNsfSettings, 0, 4);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel10, 0, 6);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel9, 0, 5);
this.tableLayoutPanel2.Controls.Add(this.lblNsfSettings, 0, 7);
this.tableLayoutPanel2.Controls.Add(this.lblFdsSettings, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.chkFdsAutoLoadDisk, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.chkFdsFastForwardOnLoad, 0, 2);
this.tableLayoutPanel2.Controls.Add(this.chkFdsAutoInsertDisk, 0, 3);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel7, 0, 5);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel5, 0, 6);
this.tableLayoutPanel2.Controls.Add(this.chkNsfEnableApuIrqs, 0, 7);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel7, 0, 8);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel5, 0, 9);
this.tableLayoutPanel2.Controls.Add(this.chkNsfEnableApuIrqs, 0, 10);
this.tableLayoutPanel2.Controls.Add(this.lblVsDualSystem, 0, 4);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 9;
this.tableLayoutPanel2.RowCount = 12;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
@ -890,17 +902,82 @@ namespace Mesen.GUI.Forms.Config
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(483, 390);
this.tableLayoutPanel2.TabIndex = 0;
//
// flowLayoutPanel10
//
this.flowLayoutPanel10.Controls.Add(this.lblVsDualPlayAudio);
this.flowLayoutPanel10.Controls.Add(this.cboVsDualAudioOutput);
this.flowLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel10.Location = new System.Drawing.Point(0, 129);
this.flowLayoutPanel10.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel10.Name = "flowLayoutPanel10";
this.flowLayoutPanel10.Size = new System.Drawing.Size(483, 27);
this.flowLayoutPanel10.TabIndex = 29;
//
// lblVsDualPlayAudio
//
this.lblVsDualPlayAudio.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblVsDualPlayAudio.AutoSize = true;
this.lblVsDualPlayAudio.Location = new System.Drawing.Point(10, 7);
this.lblVsDualPlayAudio.Margin = new System.Windows.Forms.Padding(10, 0, 3, 0);
this.lblVsDualPlayAudio.Name = "lblVsDualPlayAudio";
this.lblVsDualPlayAudio.Size = new System.Drawing.Size(74, 13);
this.lblVsDualPlayAudio.TabIndex = 4;
this.lblVsDualPlayAudio.Text = "Play audio for:";
//
// cboVsDualAudioOutput
//
this.cboVsDualAudioOutput.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboVsDualAudioOutput.FormattingEnabled = true;
this.cboVsDualAudioOutput.Location = new System.Drawing.Point(90, 3);
this.cboVsDualAudioOutput.Name = "cboVsDualAudioOutput";
this.cboVsDualAudioOutput.Size = new System.Drawing.Size(127, 21);
this.cboVsDualAudioOutput.TabIndex = 5;
//
// flowLayoutPanel9
//
this.flowLayoutPanel9.Controls.Add(this.lblVsDualShowVideo);
this.flowLayoutPanel9.Controls.Add(this.cboVsDualVideoOutput);
this.flowLayoutPanel9.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel9.Location = new System.Drawing.Point(0, 102);
this.flowLayoutPanel9.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel9.Name = "flowLayoutPanel9";
this.flowLayoutPanel9.Size = new System.Drawing.Size(483, 27);
this.flowLayoutPanel9.TabIndex = 28;
//
// lblVsDualShowVideo
//
this.lblVsDualShowVideo.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblVsDualShowVideo.AutoSize = true;
this.lblVsDualShowVideo.Location = new System.Drawing.Point(10, 7);
this.lblVsDualShowVideo.Margin = new System.Windows.Forms.Padding(10, 0, 3, 0);
this.lblVsDualShowVideo.Name = "lblVsDualShowVideo";
this.lblVsDualShowVideo.Size = new System.Drawing.Size(114, 13);
this.lblVsDualShowVideo.TabIndex = 4;
this.lblVsDualShowVideo.Text = "Show video for:";
//
// cboVsDualVideoOutput
//
this.cboVsDualVideoOutput.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboVsDualVideoOutput.FormattingEnabled = true;
this.cboVsDualVideoOutput.Location = new System.Drawing.Point(130, 3);
this.cboVsDualVideoOutput.Name = "cboVsDualVideoOutput";
this.cboVsDualVideoOutput.Size = new System.Drawing.Size(127, 21);
this.cboVsDualVideoOutput.TabIndex = 5;
//
// lblNsfSettings
//
this.lblNsfSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblNsfSettings.AutoSize = true;
this.lblNsfSettings.ForeColor = System.Drawing.SystemColors.GrayText;
this.lblNsfSettings.Location = new System.Drawing.Point(0, 89);
this.lblNsfSettings.Location = new System.Drawing.Point(0, 163);
this.lblNsfSettings.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.lblNsfSettings.Name = "lblNsfSettings";
this.lblNsfSettings.Size = new System.Drawing.Size(69, 13);
@ -958,7 +1035,7 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel7.Controls.Add(this.nudNsfAutoDetectSilenceDelay);
this.flowLayoutPanel7.Controls.Add(this.lblNsfMillisecondsOfSilence);
this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 102);
this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 176);
this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel7.Name = "flowLayoutPanel7";
this.flowLayoutPanel7.Size = new System.Drawing.Size(483, 24);
@ -1025,7 +1102,7 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel5.Controls.Add(this.nudNsfMoveToNextTrackTime);
this.flowLayoutPanel5.Controls.Add(this.lblNsfSeconds);
this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 126);
this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 200);
this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel5.Name = "flowLayoutPanel5";
this.flowLayoutPanel5.Size = new System.Drawing.Size(483, 24);
@ -1090,13 +1167,25 @@ namespace Mesen.GUI.Forms.Config
//
this.chkNsfEnableApuIrqs.Checked = false;
this.chkNsfEnableApuIrqs.Dock = System.Windows.Forms.DockStyle.Fill;
this.chkNsfEnableApuIrqs.Location = new System.Drawing.Point(10, 150);
this.chkNsfEnableApuIrqs.Location = new System.Drawing.Point(10, 224);
this.chkNsfEnableApuIrqs.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0);
this.chkNsfEnableApuIrqs.Name = "chkNsfEnableApuIrqs";
this.chkNsfEnableApuIrqs.Size = new System.Drawing.Size(473, 23);
this.chkNsfEnableApuIrqs.TabIndex = 26;
this.chkNsfEnableApuIrqs.Text = "Enable APU IRQs for NSF files";
//
// lblVsDualSystem
//
this.lblVsDualSystem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblVsDualSystem.AutoSize = true;
this.lblVsDualSystem.ForeColor = System.Drawing.SystemColors.GrayText;
this.lblVsDualSystem.Location = new System.Drawing.Point(0, 89);
this.lblVsDualSystem.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.lblVsDualSystem.Name = "lblVsDualSystem";
this.lblVsDualSystem.Size = new System.Drawing.Size(121, 13);
this.lblVsDualSystem.TabIndex = 27;
this.lblVsDualSystem.Text = "VS DualSystem Settings";
//
// tpgFiles
//
this.tpgFiles.Controls.Add(this.tableLayoutPanel6);
@ -1894,6 +1983,10 @@ namespace Mesen.GUI.Forms.Config
this.tpgFdsNfs.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.flowLayoutPanel10.ResumeLayout(false);
this.flowLayoutPanel10.PerformLayout();
this.flowLayoutPanel9.ResumeLayout(false);
this.flowLayoutPanel9.PerformLayout();
this.flowLayoutPanel7.ResumeLayout(false);
this.flowLayoutPanel7.PerformLayout();
this.flowLayoutPanel5.ResumeLayout(false);
@ -2048,5 +2141,12 @@ namespace Mesen.GUI.Forms.Config
private System.Windows.Forms.Label lblWindowSettings;
private System.Windows.Forms.CheckBox chkDisableMouseResize;
private ctrlRiskyOption chkNsfEnableApuIrqs;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel10;
private System.Windows.Forms.Label lblVsDualPlayAudio;
private System.Windows.Forms.ComboBox cboVsDualAudioOutput;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel9;
private System.Windows.Forms.Label lblVsDualShowVideo;
private System.Windows.Forms.ComboBox cboVsDualVideoOutput;
private System.Windows.Forms.Label lblVsDualSystem;
}
}

View file

@ -43,6 +43,9 @@ namespace Mesen.GUI.Forms.Config
AddBinding("NsfAutoDetectSilenceDelay", nudNsfAutoDetectSilenceDelay);
AddBinding("NsfEnableApuIrqs", chkNsfEnableApuIrqs);
AddBinding("VsDualVideoOutput", cboVsDualVideoOutput);
AddBinding("VsDualAudioOutput", cboVsDualAudioOutput);
AddBinding("FdsAutoLoadDisk", chkFdsAutoLoadDisk);
AddBinding("FdsFastForwardOnLoad", chkFdsFastForwardOnLoad);
AddBinding("FdsAutoInsertDisk", chkFdsAutoInsertDisk);

View file

@ -122,7 +122,17 @@ namespace Mesen.GUI.Forms
private void mnuPreferences_Click(object sender, EventArgs e)
{
using(frmPreferences frm = new frmPreferences()) {
VsDualOutputOption originalVsDualOutput = ConfigManager.Config.PreferenceInfo.VsDualVideoOutput;
if(frm.ShowDialog(sender, this) == DialogResult.OK) {
VsDualOutputOption newVsDualOutput = ConfigManager.Config.PreferenceInfo.VsDualVideoOutput;
if(originalVsDualOutput != newVsDualOutput) {
if(newVsDualOutput == VsDualOutputOption.Both || originalVsDualOutput == VsDualOutputOption.Both) {
UpdateViewerSize(true);
} else {
UpdateDualSystemViewer();
}
}
ResourceHelper.LoadResources(ConfigManager.Config.PreferenceInfo.DisplayLanguage);
ResourceHelper.UpdateEmuLanguage();
ResourceHelper.ApplyResources(this);

View file

@ -340,26 +340,24 @@ namespace Mesen.GUI.Forms
InteropEmu.ScreenSize size = InteropEmu.GetScreenSize(false);
int width = _isDualSystem ? (size.Width * 2) : size.Width;
if(forceUpdate || (!_customSize && this.WindowState != FormWindowState.Maximized)) {
Size sizeGap = this.Size - this.ClientSize;
bool doubleScreenMode = _isDualSystem && ConfigManager.Config.PreferenceInfo.VsDualVideoOutput == VsDualOutputOption.Both;
int width = doubleScreenMode ? (size.Width * 2) : size.Width;
UpdateScaleMenu(size.Scale);
this.ClientSize = new Size(Math.Max(this.MinimumSize.Width - sizeGap.Width, width), Math.Max(this.MinimumSize.Height - sizeGap.Height, size.Height + (this.HideMenuStrip ? 0 : menuStrip.Height)));
}
ctrlRenderer.Size = new Size(size.Width, size.Height);
if(_isDualSystem) {
ctrlRendererDualSystem.Size = new Size(size.Width, size.Height);
ctrlRendererDualSystem.Top = (panelRenderer.Height - ctrlRenderer.Height) / 2;
ctrlRenderer.Left = (panelRenderer.Width / 2 - ctrlRenderer.Width) / 2;
ctrlRendererDualSystem.Left = ctrlRenderer.Left + ctrlRenderer.Width;
} else {
ctrlRenderer.Left = (panelRenderer.Width - ctrlRenderer.Width) / 2;
}
ctrlRenderer.Top = (panelRenderer.Height - ctrlRenderer.Height) / 2;
ctrlRenderer.Left = (panelRenderer.Width - ctrlRenderer.Width) / 2;
if(_isDualSystem) {
UpdateDualSystemViewer();
}
if(this.HideMenuStrip) {
this.menuStrip.Visible = false;
}
@ -367,6 +365,28 @@ namespace Mesen.GUI.Forms
this.Resize += frmMain_Resize;
}
private void UpdateDualSystemViewer()
{
ctrlRendererDualSystem.Size = new Size(ctrlRenderer.Width, ctrlRenderer.Height);
ctrlRendererDualSystem.Top = (panelRenderer.Height - ctrlRenderer.Height) / 2;
if(ConfigManager.Config.PreferenceInfo.VsDualVideoOutput == VsDualOutputOption.Both) {
ctrlRenderer.Left = (panelRenderer.Width / 2 - ctrlRenderer.Width) / 2;
ctrlRendererDualSystem.Left = ctrlRenderer.Left + ctrlRenderer.Width;
ctrlRendererDualSystem.Visible = true;
} else {
ctrlRendererDualSystem.Left = (panelRenderer.Width - ctrlRenderer.Width) / 2;
if(ConfigManager.Config.PreferenceInfo.VsDualVideoOutput == VsDualOutputOption.SlaveOnly) {
ctrlRendererDualSystem.Visible = true;
ctrlRendererDualSystem.BringToFront();
} else {
ctrlRendererDualSystem.Visible = false;
}
}
}
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
{
_yFactor = factor.Height;
@ -644,7 +664,6 @@ namespace Mesen.GUI.Forms
case InteropEmu.ConsoleNotificationType.VsDualSystemStarted:
_isDualSystem = true;
this.BeginInvoke((MethodInvoker)(() => {
ctrlRendererDualSystem.Visible = _isDualSystem;
UpdateViewerSize(true);
InteropEmu.InitializeDualSystem(this.Handle, ctrlRendererDualSystem.Handle);
}));
@ -654,7 +673,6 @@ namespace Mesen.GUI.Forms
_isDualSystem = false;
InteropEmu.ReleaseDualSystemAudioVideo();
this.BeginInvoke((MethodInvoker)(() => {
ctrlRendererDualSystem.Visible = _isDualSystem;
UpdateViewerSize(true);
}));
break;

View file

@ -1543,6 +1543,9 @@ namespace Mesen.GUI
ReduceSoundInFastForward = 0x100000000000000,
VsDualMuteMaster = 0x200000000000000,
VsDualMuteSlave = 0x400000000000000,
ForceMaxSpeed = 0x4000000000000000,
ConsoleMode = 0x8000000000000000,
}