From 8dfbd752aec476feafa5677ad02c8c2e5f3bda27 Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 14 Nov 2019 21:03:50 -0600 Subject: [PATCH] SmvImport - remove useless If --- BizHawk.Client.Common/movie/import/SmvImport.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/BizHawk.Client.Common/movie/import/SmvImport.cs b/BizHawk.Client.Common/movie/import/SmvImport.cs index 70fefd365a..e52a25c09c 100644 --- a/BizHawk.Client.Common/movie/import/SmvImport.cs +++ b/BizHawk.Client.Common/movie/import/SmvImport.cs @@ -301,17 +301,10 @@ namespace BizHawk.Client.Common.movie.import } ushort controllerState = (ushort)(((controllerState1 << 4) & 0x0F00) | controllerState2); - if (player <= BkmMnemonicConstants.Players[controllers.Definition.Name]) + for (int button = 0; button < buttons.Length; button++) { - for (int button = 0; button < buttons.Length; button++) - { - controllers[$"P{player} {buttons[button]}"] = - ((controllerState >> button) & 0x1) != 0; - } - } - else if (!Result.Warnings.Any()) - { - Result.Warnings.Add($"Controller {player} not supported."); + controllers[$"P{player} {buttons[button]}"] = + ((controllerState >> button) & 0x1) != 0; } }