mirror of
https://github.com/libretro/Mesen.git
synced 2025-01-31 13:52:19 +00:00
Video: Added refresh rate selection for exclusive fullscreen
This commit is contained in:
parent
78ad8e7b96
commit
ffa58b6380
@ -78,6 +78,7 @@ NtscFilterSettings EmulationSettings::_ntscFilterSettings;
|
||||
bool EmulationSettings::_backgroundEnabled = true;
|
||||
bool EmulationSettings::_spritesEnabled = true;
|
||||
uint32_t EmulationSettings::_screenRotation = 0;
|
||||
uint32_t EmulationSettings::_exclusiveRefreshRate = 60;
|
||||
|
||||
ConsoleType EmulationSettings::_consoleType = ConsoleType::Nes;
|
||||
ExpansionPortDevice EmulationSettings::_expansionDevice = ExpansionPortDevice::None;
|
||||
|
@ -605,6 +605,7 @@ private:
|
||||
static bool _backgroundEnabled;
|
||||
static bool _spritesEnabled;
|
||||
static uint32_t _screenRotation;
|
||||
static uint32_t _exclusiveRefreshRate;
|
||||
|
||||
static ConsoleType _consoleType;
|
||||
static ExpansionPortDevice _expansionDevice;
|
||||
@ -1159,6 +1160,16 @@ public:
|
||||
return _screenRotation;
|
||||
}
|
||||
|
||||
static void SetExclusiveRefreshRate(uint32_t refreshRate)
|
||||
{
|
||||
_exclusiveRefreshRate = refreshRate;
|
||||
}
|
||||
|
||||
static uint32_t GetExclusiveRefreshRate()
|
||||
{
|
||||
return _exclusiveRefreshRate;
|
||||
}
|
||||
|
||||
static uint32_t* GetRgbPalette()
|
||||
{
|
||||
return _currentPalette;
|
||||
|
@ -52,6 +52,7 @@ namespace Mesen.GUI.Config
|
||||
|
||||
public bool FullscreenForceIntegerScale = false;
|
||||
public bool UseExclusiveFullscreen = false;
|
||||
public VideoRefreshRates ExclusiveFullscreenRefreshRate = VideoRefreshRates._60;
|
||||
|
||||
public bool UseCustomVsPalette = false;
|
||||
public bool ShowColorIndexes = true;
|
||||
@ -82,6 +83,8 @@ namespace Mesen.GUI.Config
|
||||
|
||||
InteropEmu.SetScreenRotation((UInt32)videoInfo.ScreenRotation);
|
||||
|
||||
InteropEmu.SetExclusiveRefreshRate((UInt32)videoInfo.ExclusiveFullscreenRefreshRate);
|
||||
|
||||
InteropEmu.SetVideoFilter(videoInfo.VideoFilter);
|
||||
InteropEmu.SetVideoResizeFilter(videoInfo.UseBilinearInterpolation ? VideoResizeFilter.Bilinear : VideoResizeFilter.NearestNeighbor);
|
||||
InteropEmu.SetVideoScale(videoInfo.VideoScale <= 10 ? videoInfo.VideoScale : 2);
|
||||
|
@ -222,6 +222,7 @@
|
||||
<Control ID="chkShowFps">Mostra els FPS</Control>
|
||||
<Control ID="chkUseHdPacks">Fes servir els paquets d'alta resolució d'HDNes</Control>
|
||||
<Control ID="chkUseExclusiveFullscreen">Fes servir el mode de pantalla completa exclusiva</Control>
|
||||
<Control ID="lblRequestedRefreshRate">Requested Refresh Rate:</Control>
|
||||
<Control ID="tpgOverscan">Sobreescaneig</Control>
|
||||
<Control ID="grpCropping">Retall de vídeo</Control>
|
||||
<Control ID="lblLeft">Esquerra</Control>
|
||||
@ -867,6 +868,14 @@
|
||||
<Value ID="Widescreen">Pantalla panoràmica (16:9)</Value>
|
||||
<Value ID="Custom">Personalitzat</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">Cap</Value>
|
||||
<Value ID="_90Degrees">90°</Value>
|
||||
|
@ -203,6 +203,14 @@
|
||||
<Value ID="Widescreen">Widescreen (16:9)</Value>
|
||||
<Value ID="Custom">Custom</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">None</Value>
|
||||
<Value ID="_90Degrees">90°</Value>
|
||||
|
@ -221,6 +221,7 @@
|
||||
<Control ID="chkShowFps">Mostrar FPS</Control>
|
||||
<Control ID="chkUseHdPacks">Utilizar los paquetes de alta resolución de HDNes</Control>
|
||||
<Control ID="chkUseExclusiveFullscreen">Use exclusive fullscreen mode</Control>
|
||||
<Control ID="lblRequestedRefreshRate">Requested Refresh Rate:</Control>
|
||||
<Control ID="tpgOverscan">Overscan</Control>
|
||||
<Control ID="grpCropping">Recorte</Control>
|
||||
<Control ID="lblLeft">Izquierda</Control>
|
||||
@ -885,6 +886,14 @@
|
||||
<Value ID="Widescreen">Pantalla panorámica (16:9)</Value>
|
||||
<Value ID="Custom">Personalizado</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">None</Value>
|
||||
<Value ID="_90Degrees">90°</Value>
|
||||
|
@ -222,6 +222,7 @@
|
||||
<Control ID="chkShowFps">Afficher le FPS</Control>
|
||||
<Control ID="chkUseHdPacks">Utiliser les packs haute-définition de HDNes</Control>
|
||||
<Control ID="chkUseExclusiveFullscreen">Utiliser le mode plein écran exclusif</Control>
|
||||
<Control ID="lblRequestedRefreshRate">Taux de rafraîchissement :</Control>
|
||||
<Control ID="tpgOverscan">Overscan</Control>
|
||||
<Control ID="grpCropping">Overscan</Control>
|
||||
<Control ID="lblLeft">Gauche</Control>
|
||||
@ -898,6 +899,14 @@
|
||||
<Value ID="Widescreen">Écran large (16:9)</Value>
|
||||
<Value ID="Custom">Personalisé</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">Aucune</Value>
|
||||
<Value ID="_90Degrees">90°</Value>
|
||||
|
@ -223,6 +223,7 @@
|
||||
<Control ID="chkShowFps">フレームレート表示</Control>
|
||||
<Control ID="chkUseHdPacks">HDNesのHDパックを使う</Control>
|
||||
<Control ID="chkUseExclusiveFullscreen">排他的なフルスクリーンモードを使う</Control>
|
||||
<Control ID="lblRequestedRefreshRate">リフレッシュレート:</Control>
|
||||
<Control ID="tpgOverscan">オーバースキャン</Control>
|
||||
<Control ID="grpCropping">オーバースキャン</Control>
|
||||
<Control ID="lblLeft">左</Control>
|
||||
@ -882,6 +883,14 @@
|
||||
<Value ID="Widescreen">ワイド (16:9)</Value>
|
||||
<Value ID="Custom">カスタム</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">なし</Value>
|
||||
<Value ID="_90Degrees">90度</Value>
|
||||
|
@ -221,6 +221,7 @@
|
||||
<Control ID="chkShowFps">Mostrar FPS</Control>
|
||||
<Control ID="chkUseHdPacks">Usar os pacotes de alta definição do HDNes</Control>
|
||||
<Control ID="chkUseExclusiveFullscreen">Use exclusive fullscreen mode</Control>
|
||||
<Control ID="lblRequestedRefreshRate">Requested Refresh Rate:</Control>
|
||||
<Control ID="tpgOverscan">Overscan</Control>
|
||||
<Control ID="grpCropping">Recorte</Control>
|
||||
<Control ID="lblLeft">Esquerda</Control>
|
||||
@ -883,6 +884,14 @@
|
||||
<Value ID="Widescreen">Widescreen (16:9)</Value>
|
||||
<Value ID="Custom">Personalizado</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">Nenhuma</Value>
|
||||
<Value ID="_90Degrees">90°</Value>
|
||||
|
@ -221,6 +221,7 @@
|
||||
<Control ID="chkShowFps">Показывать FPS</Control>
|
||||
<Control ID="chkUseHdPacks">Использовать HDNes HD packs</Control>
|
||||
<Control ID="chkUseExclusiveFullscreen">Use exclusive fullscreen mode</Control>
|
||||
<Control ID="lblRequestedRefreshRate">Requested Refresh Rate:</Control>
|
||||
<Control ID="tpgOverscan">Overscan</Control>
|
||||
<Control ID="grpCropping">Overscan</Control>
|
||||
<Control ID="lblLeft">Слева</Control>
|
||||
@ -887,6 +888,14 @@
|
||||
<Value ID="Widescreen">Широкий экран (16:9)</Value>
|
||||
<Value ID="Custom">Custom</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">None</Value>
|
||||
<Value ID="_90Degrees">90°</Value>
|
||||
|
@ -221,6 +221,7 @@
|
||||
<Control ID="chkShowFps">Показувати FPS</Control>
|
||||
<Control ID="chkUseHdPacks">Використовувати HDNes HD packs</Control>
|
||||
<Control ID="chkUseExclusiveFullscreen">Use exclusive fullscreen mode</Control>
|
||||
<Control ID="lblRequestedRefreshRate">Requested Refresh Rate:</Control>
|
||||
<Control ID="tpgOverscan">Overscan</Control>
|
||||
<Control ID="grpCropping">Overscan</Control>
|
||||
<Control ID="lblLeft">Злiва</Control>
|
||||
@ -887,6 +888,14 @@
|
||||
<Value ID="Widescreen">Широкий екран (16:9)</Value>
|
||||
<Value ID="Custom">Custom</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoRefreshRates">
|
||||
<Value ID="_50">50 Hz</Value>
|
||||
<Value ID="_60">60 Hz</Value>
|
||||
<Value ID="_100">100 Hz</Value>
|
||||
<Value ID="_120">120 Hz</Value>
|
||||
<Value ID="_200">200 Hz</Value>
|
||||
<Value ID="_240">240 Hz</Value>
|
||||
</Enum>
|
||||
<Enum ID="ScreenRotation">
|
||||
<Value ID="None">Нiякий</Value>
|
||||
<Value ID="_90Degrees">90°</Value>
|
||||
|
92
GUI.NET/Forms/Config/frmVideoConfig.Designer.cs
generated
92
GUI.NET/Forms/Config/frmVideoConfig.Designer.cs
generated
@ -31,6 +31,7 @@ namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.chkUseExclusiveFullscreen = new System.Windows.Forms.CheckBox();
|
||||
this.lblVideoScale = new System.Windows.Forms.Label();
|
||||
this.chkVerticalSync = new System.Windows.Forms.CheckBox();
|
||||
this.lblDisplayRatio = new System.Windows.Forms.Label();
|
||||
@ -44,8 +45,9 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.nudCustomRatio = new Mesen.GUI.Controls.MesenNumericUpDown();
|
||||
this.chkFullscreenForceIntegerScale = new System.Windows.Forms.CheckBox();
|
||||
this.chkShowFps = new System.Windows.Forms.CheckBox();
|
||||
this.chkUseExclusiveFullscreen = new System.Windows.Forms.CheckBox();
|
||||
this.chkIntegerFpsMode = new System.Windows.Forms.CheckBox();
|
||||
this.cboRefreshRate = new System.Windows.Forms.ComboBox();
|
||||
this.lblRequestedRefreshRate = new System.Windows.Forms.Label();
|
||||
this.tabMain = new System.Windows.Forms.TabControl();
|
||||
this.tpgGeneral = new System.Windows.Forms.TabPage();
|
||||
this.tpgPicture = new System.Windows.Forms.TabPage();
|
||||
@ -128,6 +130,7 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.mnuPaletteSonyCxa2025As = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPaletteUnsaturated = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPaletteYuv = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.flpRefreshRate = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.tlpMain.SuspendLayout();
|
||||
this.flowLayoutPanel7.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picHdNesTooltip)).BeginInit();
|
||||
@ -159,6 +162,7 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.tableLayoutPanel9.SuspendLayout();
|
||||
this.contextPicturePresets.SuspendLayout();
|
||||
this.contextPaletteList.SuspendLayout();
|
||||
this.flpRefreshRate.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// baseConfigPanel
|
||||
@ -171,21 +175,23 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.tlpMain.ColumnCount = 2;
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpMain.Controls.Add(this.chkUseExclusiveFullscreen, 0, 4);
|
||||
this.tlpMain.Controls.Add(this.lblVideoScale, 0, 0);
|
||||
this.tlpMain.Controls.Add(this.chkVerticalSync, 0, 3);
|
||||
this.tlpMain.Controls.Add(this.lblDisplayRatio, 0, 1);
|
||||
this.tlpMain.Controls.Add(this.flowLayoutPanel7, 0, 6);
|
||||
this.tlpMain.Controls.Add(this.flowLayoutPanel7, 0, 7);
|
||||
this.tlpMain.Controls.Add(this.nudScale, 1, 0);
|
||||
this.tlpMain.Controls.Add(this.flowLayoutPanel6, 1, 1);
|
||||
this.tlpMain.Controls.Add(this.chkFullscreenForceIntegerScale, 0, 5);
|
||||
this.tlpMain.Controls.Add(this.chkShowFps, 0, 7);
|
||||
this.tlpMain.Controls.Add(this.chkUseExclusiveFullscreen, 0, 4);
|
||||
this.tlpMain.Controls.Add(this.chkFullscreenForceIntegerScale, 0, 6);
|
||||
this.tlpMain.Controls.Add(this.chkShowFps, 0, 8);
|
||||
this.tlpMain.Controls.Add(this.chkIntegerFpsMode, 0, 2);
|
||||
this.tlpMain.Controls.Add(this.flpRefreshRate, 0, 5);
|
||||
this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpMain.Location = new System.Drawing.Point(3, 3);
|
||||
this.tlpMain.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tlpMain.Name = "tlpMain";
|
||||
this.tlpMain.RowCount = 9;
|
||||
this.tlpMain.RowCount = 10;
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
@ -198,6 +204,19 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.tlpMain.Size = new System.Drawing.Size(521, 370);
|
||||
this.tlpMain.TabIndex = 1;
|
||||
//
|
||||
// chkUseExclusiveFullscreen
|
||||
//
|
||||
this.chkUseExclusiveFullscreen.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.chkUseExclusiveFullscreen.AutoSize = true;
|
||||
this.tlpMain.SetColumnSpan(this.chkUseExclusiveFullscreen, 2);
|
||||
this.chkUseExclusiveFullscreen.Location = new System.Drawing.Point(3, 95);
|
||||
this.chkUseExclusiveFullscreen.Name = "chkUseExclusiveFullscreen";
|
||||
this.chkUseExclusiveFullscreen.Size = new System.Drawing.Size(169, 17);
|
||||
this.chkUseExclusiveFullscreen.TabIndex = 24;
|
||||
this.chkUseExclusiveFullscreen.Text = "Use exclusive fullscreen mode";
|
||||
this.chkUseExclusiveFullscreen.UseVisualStyleBackColor = true;
|
||||
this.chkUseExclusiveFullscreen.CheckedChanged += new System.EventHandler(this.chkUseExclusiveFullscreen_CheckedChanged);
|
||||
//
|
||||
// lblVideoScale
|
||||
//
|
||||
this.lblVideoScale.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
@ -236,7 +255,7 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.flowLayoutPanel7.Controls.Add(this.chkUseHdPacks);
|
||||
this.flowLayoutPanel7.Controls.Add(this.picHdNesTooltip);
|
||||
this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 138);
|
||||
this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 165);
|
||||
this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel7.Name = "flowLayoutPanel7";
|
||||
this.flowLayoutPanel7.Size = new System.Drawing.Size(521, 23);
|
||||
@ -372,7 +391,7 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.chkFullscreenForceIntegerScale.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.chkFullscreenForceIntegerScale.AutoSize = true;
|
||||
this.tlpMain.SetColumnSpan(this.chkFullscreenForceIntegerScale, 2);
|
||||
this.chkFullscreenForceIntegerScale.Location = new System.Drawing.Point(3, 118);
|
||||
this.chkFullscreenForceIntegerScale.Location = new System.Drawing.Point(3, 145);
|
||||
this.chkFullscreenForceIntegerScale.Name = "chkFullscreenForceIntegerScale";
|
||||
this.chkFullscreenForceIntegerScale.Size = new System.Drawing.Size(289, 17);
|
||||
this.chkFullscreenForceIntegerScale.TabIndex = 23;
|
||||
@ -384,25 +403,13 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.chkShowFps.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.chkShowFps.AutoSize = true;
|
||||
this.tlpMain.SetColumnSpan(this.chkShowFps, 2);
|
||||
this.chkShowFps.Location = new System.Drawing.Point(3, 164);
|
||||
this.chkShowFps.Location = new System.Drawing.Point(3, 191);
|
||||
this.chkShowFps.Name = "chkShowFps";
|
||||
this.chkShowFps.Size = new System.Drawing.Size(76, 17);
|
||||
this.chkShowFps.TabIndex = 9;
|
||||
this.chkShowFps.Text = "Show FPS";
|
||||
this.chkShowFps.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkUseExclusiveFullscreen
|
||||
//
|
||||
this.chkUseExclusiveFullscreen.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.chkUseExclusiveFullscreen.AutoSize = true;
|
||||
this.tlpMain.SetColumnSpan(this.chkUseExclusiveFullscreen, 2);
|
||||
this.chkUseExclusiveFullscreen.Location = new System.Drawing.Point(3, 95);
|
||||
this.chkUseExclusiveFullscreen.Name = "chkUseExclusiveFullscreen";
|
||||
this.chkUseExclusiveFullscreen.Size = new System.Drawing.Size(169, 17);
|
||||
this.chkUseExclusiveFullscreen.TabIndex = 24;
|
||||
this.chkUseExclusiveFullscreen.Text = "Use exclusive fullscreen mode";
|
||||
this.chkUseExclusiveFullscreen.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkIntegerFpsMode
|
||||
//
|
||||
this.chkIntegerFpsMode.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
@ -415,6 +422,31 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.chkIntegerFpsMode.Text = "Enable integer FPS mode (e.g: run at 60 fps instead of 60.1)";
|
||||
this.chkIntegerFpsMode.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cboRefreshRate
|
||||
//
|
||||
this.cboRefreshRate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboRefreshRate.FormattingEnabled = true;
|
||||
this.cboRefreshRate.Items.AddRange(new object[] {
|
||||
"Auto",
|
||||
"NTSC (8:7)",
|
||||
"PAL (18:13)",
|
||||
"Standard (4:3)",
|
||||
"Widescreen (16:9)"});
|
||||
this.cboRefreshRate.Location = new System.Drawing.Point(137, 3);
|
||||
this.cboRefreshRate.Name = "cboRefreshRate";
|
||||
this.cboRefreshRate.Size = new System.Drawing.Size(68, 21);
|
||||
this.cboRefreshRate.TabIndex = 25;
|
||||
//
|
||||
// lblRequestedRefreshRate
|
||||
//
|
||||
this.lblRequestedRefreshRate.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.lblRequestedRefreshRate.AutoSize = true;
|
||||
this.lblRequestedRefreshRate.Location = new System.Drawing.Point(3, 7);
|
||||
this.lblRequestedRefreshRate.Name = "lblRequestedRefreshRate";
|
||||
this.lblRequestedRefreshRate.Size = new System.Drawing.Size(128, 13);
|
||||
this.lblRequestedRefreshRate.TabIndex = 17;
|
||||
this.lblRequestedRefreshRate.Text = "Requested Refresh Rate:";
|
||||
//
|
||||
// tabMain
|
||||
//
|
||||
this.tabMain.Controls.Add(this.tpgGeneral);
|
||||
@ -1515,6 +1547,19 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.mnuPaletteYuv.Text = "YUV v3 (by FirebrandX)";
|
||||
this.mnuPaletteYuv.Click += new System.EventHandler(this.mnuPaletteYuv_Click);
|
||||
//
|
||||
// flpRefreshRate
|
||||
//
|
||||
this.tlpMain.SetColumnSpan(this.flpRefreshRate, 2);
|
||||
this.flpRefreshRate.Controls.Add(this.lblRequestedRefreshRate);
|
||||
this.flpRefreshRate.Controls.Add(this.cboRefreshRate);
|
||||
this.flpRefreshRate.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flpRefreshRate.Location = new System.Drawing.Point(30, 115);
|
||||
this.flpRefreshRate.Margin = new System.Windows.Forms.Padding(30, 0, 0, 0);
|
||||
this.flpRefreshRate.Name = "flpRefreshRate";
|
||||
this.flpRefreshRate.Size = new System.Drawing.Size(491, 27);
|
||||
this.flpRefreshRate.TabIndex = 26;
|
||||
this.flpRefreshRate.Visible = false;
|
||||
//
|
||||
// frmVideoConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -1575,6 +1620,8 @@ namespace Mesen.GUI.Forms.Config
|
||||
this.tableLayoutPanel9.PerformLayout();
|
||||
this.contextPicturePresets.ResumeLayout(false);
|
||||
this.contextPaletteList.ResumeLayout(false);
|
||||
this.flpRefreshRate.ResumeLayout(false);
|
||||
this.flpRefreshRate.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -1679,5 +1726,8 @@ namespace Mesen.GUI.Forms.Config
|
||||
private System.Windows.Forms.Label lblScreenRotation;
|
||||
private System.Windows.Forms.ComboBox cboScreenRotation;
|
||||
private System.Windows.Forms.CheckBox chkUseExclusiveFullscreen;
|
||||
private System.Windows.Forms.Label lblRequestedRefreshRate;
|
||||
private System.Windows.Forms.ComboBox cboRefreshRate;
|
||||
private System.Windows.Forms.FlowLayoutPanel flpRefreshRate;
|
||||
}
|
||||
}
|
@ -30,6 +30,9 @@ namespace Mesen.GUI.Forms.Config
|
||||
AddBinding("VerticalSync", chkVerticalSync);
|
||||
AddBinding("UseHdPacks", chkUseHdPacks);
|
||||
AddBinding("IntegerFpsMode", chkIntegerFpsMode);
|
||||
AddBinding("FullscreenForceIntegerScale", chkFullscreenForceIntegerScale);
|
||||
AddBinding("UseExclusiveFullscreen", chkUseExclusiveFullscreen);
|
||||
AddBinding("ExclusiveFullscreenRefreshRate", cboRefreshRate);
|
||||
|
||||
AddBinding("VideoScale", nudScale);
|
||||
AddBinding("AspectRatio", cboAspectRatio);
|
||||
@ -65,8 +68,6 @@ namespace Mesen.GUI.Forms.Config
|
||||
AddBinding("DisableSprites", chkDisableSprites);
|
||||
AddBinding("ForceBackgroundFirstColumn", chkForceBackgroundFirstColumn);
|
||||
AddBinding("ForceSpritesFirstColumn", chkForceSpritesFirstColumn);
|
||||
AddBinding("FullscreenForceIntegerScale", chkFullscreenForceIntegerScale);
|
||||
AddBinding("UseExclusiveFullscreen", chkUseExclusiveFullscreen);
|
||||
|
||||
AddBinding("UseCustomVsPalette", chkUseCustomVsPalette);
|
||||
|
||||
@ -428,5 +429,10 @@ namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
this.RefreshPalette();
|
||||
}
|
||||
|
||||
private void chkUseExclusiveFullscreen_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
flpRefreshRate.Visible = chkUseExclusiveFullscreen.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,6 +180,7 @@ namespace Mesen.GUI
|
||||
[DllImport(DLLPath)] public static extern void SetOverscanDimensions(UInt32 left, UInt32 right, UInt32 top, UInt32 bottom);
|
||||
[DllImport(DLLPath)] public static extern void SetVideoScale(double scale);
|
||||
[DllImport(DLLPath)] public static extern void SetScreenRotation(UInt32 angle);
|
||||
[DllImport(DLLPath)] public static extern void SetExclusiveRefreshRate(UInt32 refreshRate);
|
||||
[DllImport(DLLPath)] public static extern void SetVideoAspectRatio(VideoAspectRatio aspectRatio, double customRatio);
|
||||
[DllImport(DLLPath)] public static extern void SetVideoFilter(VideoFilterType filter);
|
||||
[DllImport(DLLPath)] public static extern void SetVideoResizeFilter(VideoResizeFilter filter);
|
||||
@ -1910,6 +1911,16 @@ namespace Mesen.GUI
|
||||
Custom = 6
|
||||
}
|
||||
|
||||
public enum VideoRefreshRates
|
||||
{
|
||||
_50 = 50,
|
||||
_60 = 60,
|
||||
_100 = 100,
|
||||
_120 = 120,
|
||||
_200 = 200,
|
||||
_240 = 240
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum ConsoleFeatures
|
||||
{
|
||||
|
@ -446,6 +446,7 @@ namespace InteropEmu {
|
||||
DllExport void __stdcall SetPpuNmiConfig(uint32_t extraScanlinesBeforeNmi, uint32_t extraScanlinesAfterNmi) { EmulationSettings::SetPpuNmiConfig(extraScanlinesBeforeNmi, extraScanlinesAfterNmi); }
|
||||
DllExport void __stdcall SetVideoScale(double scale) { EmulationSettings::SetVideoScale(scale); }
|
||||
DllExport void __stdcall SetScreenRotation(uint32_t angle) { EmulationSettings::SetScreenRotation(angle); }
|
||||
DllExport void __stdcall SetExclusiveRefreshRate(uint32_t angle) { EmulationSettings::SetExclusiveRefreshRate(angle); }
|
||||
DllExport void __stdcall SetVideoAspectRatio(VideoAspectRatio aspectRatio, double customRatio) { EmulationSettings::SetVideoAspectRatio(aspectRatio, customRatio); }
|
||||
DllExport void __stdcall SetVideoFilter(VideoFilterType filter) { EmulationSettings::SetVideoFilterType(filter); }
|
||||
DllExport void __stdcall SetVideoResizeFilter(VideoResizeFilter filter) { EmulationSettings::SetVideoResizeFilter(filter); }
|
||||
|
@ -267,9 +267,10 @@ namespace NES
|
||||
sd.BufferDesc.Width = _realScreenWidth;
|
||||
sd.BufferDesc.Height = _realScreenHeight;
|
||||
sd.BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
sd.BufferDesc.RefreshRate.Numerator = 60;
|
||||
sd.BufferDesc.RefreshRate.Numerator = EmulationSettings::GetExclusiveRefreshRate();
|
||||
sd.BufferDesc.RefreshRate.Denominator = 1;
|
||||
sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
sd.Flags = _fullscreen ? DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH : 0;
|
||||
sd.OutputWindow = _hWnd;
|
||||
sd.SampleDesc.Count = 1;
|
||||
sd.SampleDesc.Quality = 0;
|
||||
@ -296,7 +297,7 @@ namespace NES
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(FAILED(hr)) {
|
||||
MessageManager::Log("D3D11CreateDeviceAndSwapChain() failed - Error:" + std::to_string(hr));
|
||||
return hr;
|
||||
|
@ -78,7 +78,7 @@ namespace NES {
|
||||
void DrawNESScreen();
|
||||
void DrawPauseScreen();
|
||||
|
||||
std::wstring WrapText(string text, SpriteFont* font, float maxLineWidth, uint32_t &lineCount);
|
||||
|
||||
void DrawString(string message, float x, float y, DirectX::FXMVECTOR color, float scale, SpriteFont* font = nullptr);
|
||||
void DrawString(std::wstring message, float x, float y, DirectX::FXMVECTOR color, float scale, SpriteFont* font = nullptr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user