Rewrite OSDManager.InputStrOrAll without local var

This commit is contained in:
YoshiRulz 2021-07-24 21:09:17 +10:00
parent b4738411a2
commit fd0d5a38c7
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 3 additions and 10 deletions

View File

@ -205,16 +205,9 @@ namespace BizHawk.Client.Common
}
public string InputStrOrAll()
{
IController m = _inputManager.AutofireStickyXorAdapter;
if (_movieSession.Movie.IsPlayingOrRecording() && _emulator.Frame > 0)
{
m = m.Or(_movieSession.Movie.GetInputState(_emulator.Frame - 1));
}
return MakeStringFor(m);
}
=> MakeStringFor(_movieSession.Movie.IsPlayingOrRecording() && _emulator.Frame > 0
? _inputManager.AutofireStickyXorAdapter.Or(_movieSession.Movie.GetInputState(_emulator.Frame - 1))
: _inputManager.AutofireStickyXorAdapter);
private string MakeStringFor(IController controller)
{