Progress on fixing input desyncs in history viewer
This commit is contained in:
parent
1bf62f38fc
commit
b8afcb79df
3 changed files with 7 additions and 9 deletions
|
@ -136,6 +136,7 @@ void HistoryViewer::ResumeGameplay(shared_ptr<Console> console, uint32_t resumeP
|
|||
|
||||
bool HistoryViewer::SetInput(BaseControlDevice* device)
|
||||
{
|
||||
|
||||
uint8_t port = device->GetPort();
|
||||
if (_position < _history.size()) {
|
||||
std::deque<ControlDeviceState>& stateData = _history[_position].InputLogs[port];
|
||||
|
@ -144,7 +145,7 @@ bool HistoryViewer::SetInput(BaseControlDevice* device)
|
|||
device->SetRawState(state);
|
||||
}
|
||||
}
|
||||
if (port == 0 && _pollCounter < 30) {
|
||||
if (port == 0 && _pollCounter < HistoryViewer::BufferSize) {
|
||||
_pollCounter++;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -9,7 +9,7 @@ class Console;
|
|||
class HistoryViewer : public IInputProvider
|
||||
{
|
||||
private:
|
||||
static constexpr int32_t BufferSize = 30; //Number of frames between each save state
|
||||
static constexpr int32_t BufferSize = 60; //Number of frames between each save state
|
||||
|
||||
shared_ptr<Console> _console;
|
||||
std::deque<RewindData> _history;
|
||||
|
|
|
@ -14,9 +14,7 @@ namespace Mesen.GUI.Forms
|
|||
{
|
||||
public partial class frmHistoryViewer : BaseForm
|
||||
{
|
||||
private Thread _emuThread;
|
||||
private bool _paused = true;
|
||||
private bool _isNsf = false;
|
||||
|
||||
public frmHistoryViewer()
|
||||
{
|
||||
|
@ -29,9 +27,8 @@ namespace Mesen.GUI.Forms
|
|||
|
||||
RestoreLocation(ConfigManager.Config.HistoryViewer.WindowLocation, ConfigManager.Config.HistoryViewer.WindowSize);
|
||||
|
||||
_isNsf = false; // InteropEmu.IsNsf();
|
||||
tlpRenderer.Visible = !_isNsf;
|
||||
picNsfIcon.Visible = _isNsf;
|
||||
tlpRenderer.Visible = true;
|
||||
picNsfIcon.Visible = false;
|
||||
}
|
||||
|
||||
protected override void OnClosed(EventArgs e)
|
||||
|
@ -88,7 +85,7 @@ namespace Mesen.GUI.Forms
|
|||
|
||||
private void SetScale(int scale)
|
||||
{
|
||||
ScreenSize size = EmuApi.GetScreenSize(true);
|
||||
ScreenSize size = EmuApi.GetScreenSize(true, EmuApi.ConsoleId.HistoryViewer);
|
||||
Size newSize = new Size(size.Width * scale, size.Height * scale);
|
||||
if(this.WindowState != FormWindowState.Maximized) {
|
||||
Size sizeGap = newSize - ctrlRenderer.Size;
|
||||
|
@ -194,7 +191,7 @@ namespace Mesen.GUI.Forms
|
|||
}
|
||||
|
||||
mnuImportMovie.Visible = false;
|
||||
mnuExportMovie.Enabled = mnuExportMovie.HasDropDownItems && !_isNsf;
|
||||
mnuExportMovie.Enabled = mnuExportMovie.HasDropDownItems;
|
||||
}
|
||||
|
||||
private void ExportMovie(UInt32 segStart, UInt32 segEnd)
|
||||
|
|
Loading…
Add table
Reference in a new issue