finetune displaymanager sizing to eliminate sidebars from default 2x NES scenario. please check platforms you care about (a2600 mostly) to make sure they havent regressed
This commit is contained in:
parent
424f312afa
commit
81bd846a0c
|
@ -294,6 +294,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
var filterProgram = UpdateSourceInternal(fvp, true, chain_outsize);
|
||||
|
||||
var size = filterProgram.Filters[filterProgram.Filters.Count - 1].FindOutput().SurfaceFormat.Size;
|
||||
|
||||
//zero 22-may-2014 - added this to combat problem where nes would default to having sidebars
|
||||
//this would use the actual chain output size. this is undesireable, in the following scenario:
|
||||
//load a nes game at 2x with system-preferred and integer AR enabled, and there will be sidebars.
|
||||
//the sidebars were created by this, so we can peek into it and remove the sidebars.
|
||||
//Only do this if integer fixing is enabled, since only in that case do we have discardable sidebars.
|
||||
//Otherwise discarding the 'sidebars' would result in cropping image.
|
||||
//This is getting complicated..
|
||||
if (Global.Config.DispFixScaleInteger)
|
||||
{
|
||||
var fp = filterProgram["presentation"] as Filters.FinalPresentation;
|
||||
size = fp.GetContentSize();
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
|
|
@ -49,9 +49,15 @@ namespace BizHawk.Client.EmuHawk.Filters
|
|||
//this doesnt make sense
|
||||
if (!maintainAspect)
|
||||
maintainInteger = false;
|
||||
|
||||
|
||||
float widthScale = (float)targetWidth / sourceWidth;
|
||||
float heightScale = (float)targetHeight / sourceHeight;
|
||||
//zero 22-may-2014 - added this to combat problem where nes would default to having sidebars
|
||||
if (Global.Config.DispFixScaleInteger)
|
||||
{
|
||||
widthScale = (float)targetWidth / textureSize.Width;
|
||||
heightScale = (float)targetHeight / textureSize.Height;
|
||||
}
|
||||
|
||||
if (maintainAspect)
|
||||
{
|
||||
|
@ -186,6 +192,8 @@ namespace BizHawk.Client.EmuHawk.Filters
|
|||
LL = new LetterboxingLogic(Global.Config.DispFixAspectRatio, Global.Config.DispFixScaleInteger, OutputSize.Width, OutputSize.Height, InputSize.Width, InputSize.Height, TextureSize, VirtualTextureSize);
|
||||
}
|
||||
|
||||
public Size GetContentSize() { return new Size(LL.vw, LL.vh); }
|
||||
|
||||
public override Vector2 UntransformPoint(string channel, Vector2 point)
|
||||
{
|
||||
if (nop)
|
||||
|
|
|
@ -1854,7 +1854,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void DisplayConfigMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
new config.DisplayConfigLite().ShowDialog();
|
||||
var result = new config.DisplayConfigLite().ShowDialog();
|
||||
if (result == System.Windows.Forms.DialogResult.OK)
|
||||
FrameBufferResized();
|
||||
}
|
||||
|
||||
private void CoreSelectionContextSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in New Issue