protip: When refactoring, it's not OK to just make it not work. Fixes #873

This commit is contained in:
nattthebear 2017-06-15 20:40:38 -04:00
parent c4eeb84ee8
commit 803190e6b4
2 changed files with 6 additions and 10 deletions

View File

@ -12,9 +12,11 @@ namespace BizHawk.Client.EmuHawk
{ {
private Bitmap _bmp; private Bitmap _bmp;
public BmpVideoProvider(Bitmap bmp) public BmpVideoProvider(Bitmap bmp, int vsyncnum, int vsyncden)
{ {
_bmp = bmp; _bmp = bmp;
VsyncNumerator = vsyncnum;
VsyncDenominator = vsyncden;
} }
public void Dispose() public void Dispose()
@ -50,14 +52,8 @@ namespace BizHawk.Client.EmuHawk
public int BackgroundColor => 0; public int BackgroundColor => 0;
public int VsyncNumerator public int VsyncNumerator { get; private set; }
{
get { throw new InvalidOperationException(); }
}
public int VsyncDenominator public int VsyncDenominator { get; private set; }
{
get { throw new InvalidOperationException(); }
}
} }
} }

View File

@ -3364,7 +3364,7 @@ namespace BizHawk.Client.EmuHawk
} }
} }
output = new BmpVideoProvider(bmpout); output = new BmpVideoProvider(bmpout, _currentVideoProvider.VsyncNumerator, _currentVideoProvider.VsyncDenominator);
disposableOutput = (IDisposable)output; disposableOutput = (IDisposable)output;
} }
finally finally