Virtual Pads - Fix out of range exception when virtual pad is open, a movie is playing, and the movie goes into finished mode
This commit is contained in:
parent
1306830c58
commit
d33a545605
|
@ -88,9 +88,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (Global.MovieSession.Movie.IsPlaying && !Global.MovieSession.Movie.IsFinished)
|
||||
{
|
||||
for (int i = 0; i < Pads.Count; i++)
|
||||
var inputs = CurrentFrameInputs; // THis is necessary because of the weird situation on the frame after the end of the movie, it goes into finished mode AFTER the input is read so this will be empty on that frame
|
||||
if (inputs.Any())
|
||||
{
|
||||
Pads[i].SetButtons(CurrentFrameInputs[i]);
|
||||
for (int i = 0; i < Pads.Count; i++)
|
||||
{
|
||||
Pads[i].SetButtons(inputs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!Global.Config.VirtualPadSticky)
|
||||
|
|
Loading…
Reference in New Issue