Video: Added option to force integer scale values in fullscreen mode

This commit is contained in:
Souryo 2017-08-03 21:55:31 -04:00
parent 299747e76a
commit 4e7d05734a
10 changed files with 32 additions and 5 deletions

View file

@ -48,6 +48,8 @@ namespace Mesen.GUI.Config
public bool ForceBackgroundFirstColumn = false;
public bool ForceSpritesFirstColumn = false;
public bool FullscreenForceIntegerScale = false;
public bool UseCustomVsPalette = false;
public List<PaletteInfo> SavedPalettes = new List<PaletteInfo>();

View file

@ -246,6 +246,7 @@
<Control ID="lblDisplayRatio">Formato de imagen:</Control>
<Control ID="lblCustomRatio">Relación personalizada:</Control>
<Control ID="chkBilinearInterpolation">Utilizar la interpolación bilinear</Control>
<Control ID="chkFullscreenForceIntegerScale">Use integer scale values when entering fullscreen mode</Control>
<Control ID="chkShowFps">Mostrar FPS</Control>
<Control ID="chkUseHdPacks">Utilizar los packs de alta definición de HDNes</Control>
<Control ID="tpgOverscan">Overscan</Control>

View file

@ -248,6 +248,7 @@
<Control ID="lblDisplayRatio">Format d'image :</Control>
<Control ID="lblCustomRatio">Ratio personalisé :</Control>
<Control ID="chkBilinearInterpolation">Utiliser l'interpolation bilinéaire</Control>
<Control ID="chkFullscreenForceIntegerScale">Utiliser une valeur entière pour l'échelle vidéo en mode plein écran</Control>
<Control ID="chkShowFps">Afficher le FPS</Control>
<Control ID="chkUseHdPacks">Utiliser les packs haute-définition de HDNes</Control>
<Control ID="tpgOverscan">Overscan</Control>

View file

@ -242,12 +242,13 @@
</Form>
<Form ID="frmVideoConfig" Title="映像設定">
<Control ID="tpgGeneral">全般</Control>
<Control ID="lblVideoScale">映像サイズ:</Control>
<Control ID="lblVideoScale">画面サイズ:</Control>
<Control ID="lblVideoFilter">画面エフェクト:</Control>
<Control ID="chkBilinearInterpolation">バイリニア補間を有効にする</Control>
<Control ID="chkVerticalSync">垂直同期を有効にする</Control>
<Control ID="lblDisplayRatio">画面アスペクト:</Control>
<Control ID="lblCustomRatio">アスペクトレシオ:</Control>
<Control ID="chkFullscreenForceIntegerScale">全画面表示モードに入る時、画面サイズの倍率を整数にする</Control>
<Control ID="chkShowFps">フレームレート表示</Control>
<Control ID="chkUseHdPacks">HDNesのHDパックを使う</Control>
<Control ID="tpgOverscan">オーバースキャン</Control>

View file

@ -246,6 +246,7 @@
<Control ID="lblDisplayRatio">Formato de imagem:</Control>
<Control ID="lblCustomRatio">Custom ratio:</Control>
<Control ID="chkBilinearInterpolation">Utilizar a interpolação Bilinear</Control>
<Control ID="chkFullscreenForceIntegerScale">Use integer scale values when entering fullscreen mode</Control>
<Control ID="chkShowFps">Mostrar FPS</Control>
<Control ID="chkUseHdPacks">Utilizar os packs de Alta Definição do HDNes</Control>
<Control ID="tpgOverscan">Overscan</Control>

View file

@ -248,6 +248,7 @@
<Control ID="lblDisplayRatio">Соотношение сторон :</Control>
<Control ID="lblCustomRatio">Custom ratio:</Control>
<Control ID="chkBilinearInterpolation">Билинейная интерполяция</Control>
<Control ID="chkFullscreenForceIntegerScale">Use integer scale values when entering fullscreen mode</Control>
<Control ID="chkShowFps">Показывать FPS</Control>
<Control ID="chkUseHdPacks">Использовать HDNes HD packs</Control>
<Control ID="tpgOverscan">Overscan</Control>

View file

@ -248,6 +248,7 @@
<Control ID="lblDisplayRatio">Співвідношення сторін :</Control>
<Control ID="lblCustomRatio">Користувацьке співвідношення:</Control>
<Control ID="chkBilinearInterpolation">Білінійна інтерполяція</Control>
<Control ID="chkFullscreenForceIntegerScale">Use integer scale values when entering fullscreen mode</Control>
<Control ID="chkShowFps">Показувати FPS</Control>
<Control ID="chkUseHdPacks">Використовувати HDNes HD packs</Control>
<Control ID="tpgOverscan">Overscan</Control>

View file

@ -123,6 +123,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.chkFullscreenForceIntegerScale = new System.Windows.Forms.CheckBox();
this.tlpMain.SuspendLayout();
this.flowLayoutPanel7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picHdNesTooltip)).BeginInit();
@ -176,22 +177,23 @@ namespace Mesen.GUI.Forms.Config
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.chkShowFps, 0, 4);
this.tlpMain.Controls.Add(this.flowLayoutPanel7, 0, 2);
this.tlpMain.Controls.Add(this.nudScale, 1, 0);
this.tlpMain.Controls.Add(this.flowLayoutPanel6, 1, 1);
this.tlpMain.Controls.Add(this.chkFullscreenForceIntegerScale, 0, 4);
this.tlpMain.Controls.Add(this.chkShowFps, 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 = 6;
this.tlpMain.RowCount = 7;
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());
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(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpMain.Size = new System.Drawing.Size(521, 370);
this.tlpMain.TabIndex = 1;
//
@ -232,7 +234,7 @@ 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, 101);
this.chkShowFps.Location = new System.Drawing.Point(3, 124);
this.chkShowFps.Name = "chkShowFps";
this.chkShowFps.Size = new System.Drawing.Size(76, 17);
this.chkShowFps.TabIndex = 9;
@ -1318,6 +1320,18 @@ namespace Mesen.GUI.Forms.Config
this.mnuPaletteYuv.Text = "YUV v3 (by FirebrandX)";
this.mnuPaletteYuv.Click += new System.EventHandler(this.mnuPaletteYuv_Click);
//
// chkFullscreenForceIntegerScale
//
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, 101);
this.chkFullscreenForceIntegerScale.Name = "chkFullscreenForceIntegerScale";
this.chkFullscreenForceIntegerScale.Size = new System.Drawing.Size(289, 17);
this.chkFullscreenForceIntegerScale.TabIndex = 23;
this.chkFullscreenForceIntegerScale.Text = "Use integer scale values when entering fullscreen mode";
this.chkFullscreenForceIntegerScale.UseVisualStyleBackColor = true;
//
// frmVideoConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1483,5 +1497,6 @@ namespace Mesen.GUI.Forms.Config
private System.Windows.Forms.ToolStripMenuItem mnuPaletteOriginalHardware;
private System.Windows.Forms.ToolStripMenuItem mnuPaletteCompositeDirect;
private System.Windows.Forms.CheckBox chkUseCustomVsPalette;
private System.Windows.Forms.CheckBox chkFullscreenForceIntegerScale;
}
}

View file

@ -61,6 +61,7 @@ namespace Mesen.GUI.Forms.Config
AddBinding("DisableSprites", chkDisableSprites);
AddBinding("ForceBackgroundFirstColumn", chkForceBackgroundFirstColumn);
AddBinding("ForceSpritesFirstColumn", chkForceSpritesFirstColumn);
AddBinding("FullscreenForceIntegerScale", chkFullscreenForceIntegerScale);
AddBinding("UseCustomVsPalette", chkUseCustomVsPalette);

View file

@ -405,6 +405,9 @@ namespace Mesen.GUI.Forms
double verticalScale = (double)panelRenderer.ClientSize.Height / size.Height;
double horizontalScale = (double)panelRenderer.ClientSize.Width / size.Width;
double scale = Math.Min(verticalScale, horizontalScale);
if(_fullscreenMode && ConfigManager.Config.VideoInfo.FullscreenForceIntegerScale) {
scale = Math.Floor(scale);
}
UpdateScaleMenu(scale);
VideoInfo.ApplyConfig();
}