2015-07-17 21:18:57 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Drawing.Imaging;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Mesen.GUI.Config
|
|
|
|
|
{
|
|
|
|
|
public class VideoInfo
|
|
|
|
|
{
|
2015-08-24 20:27:07 -04:00
|
|
|
|
public UInt32 EmulationSpeed = 100;
|
2015-07-17 21:18:57 -04:00
|
|
|
|
public bool ShowFPS = false;
|
2015-07-23 23:16:31 -04:00
|
|
|
|
public UInt32 OverscanLeft = 0;
|
|
|
|
|
public UInt32 OverscanRight = 0;
|
|
|
|
|
public UInt32 OverscanTop = 8;
|
|
|
|
|
public UInt32 OverscanBottom = 8;
|
2016-01-05 21:28:38 -05:00
|
|
|
|
public UInt32 VideoScale = 2;
|
|
|
|
|
public VideoFilterType VideoFilter = VideoFilterType.None;
|
2016-01-06 20:34:45 -05:00
|
|
|
|
public VideoAspectRatio AspectRatio = VideoAspectRatio.Auto;
|
|
|
|
|
public bool VerticalSync = true;
|
|
|
|
|
public bool FullscreenMode = false;
|
2015-07-17 21:18:57 -04:00
|
|
|
|
|
|
|
|
|
public VideoInfo()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static public void ApplyConfig()
|
|
|
|
|
{
|
2015-07-23 23:16:31 -04:00
|
|
|
|
VideoInfo videoInfo = ConfigManager.Config.VideoInfo;
|
2015-08-24 20:27:07 -04:00
|
|
|
|
|
|
|
|
|
InteropEmu.SetEmulationSpeed(videoInfo.EmulationSpeed);
|
2015-07-17 21:18:57 -04:00
|
|
|
|
|
2016-01-06 20:34:45 -05:00
|
|
|
|
if(videoInfo.ShowFPS) {
|
|
|
|
|
InteropEmu.SetFlags(EmulationFlags.ShowFPS);
|
2015-07-17 21:18:57 -04:00
|
|
|
|
} else {
|
2016-01-06 20:34:45 -05:00
|
|
|
|
InteropEmu.ClearFlags(EmulationFlags.ShowFPS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(videoInfo.VerticalSync) {
|
|
|
|
|
InteropEmu.SetFlags(EmulationFlags.VerticalSync);
|
|
|
|
|
} else {
|
|
|
|
|
InteropEmu.ClearFlags(EmulationFlags.VerticalSync);
|
2015-07-17 21:18:57 -04:00
|
|
|
|
}
|
2015-07-23 23:16:31 -04:00
|
|
|
|
|
|
|
|
|
InteropEmu.SetOverscanDimensions(videoInfo.OverscanLeft, videoInfo.OverscanRight, videoInfo.OverscanTop, videoInfo.OverscanBottom);
|
|
|
|
|
|
2016-01-05 21:28:38 -05:00
|
|
|
|
InteropEmu.SetVideoFilter(videoInfo.VideoFilter);
|
|
|
|
|
InteropEmu.SetVideoScale(videoInfo.VideoScale);
|
2015-07-17 21:18:57 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|