From d38b5396c32321fe4ec76bc68b43757bec03e52d Mon Sep 17 00:00:00 2001
From: adelikat <adelikat@tasvideos.org>
Date: Tue, 6 Dec 2016 10:22:03 -0600
Subject: [PATCH] Remove some commented out code that has been commented out
 for quite some time

---
 .../inputAdapters/BitwiseAdapters.cs          |  16 +-
 .../inputAdapters/InputAdapters.cs            | 153 ------------------
 2 files changed, 8 insertions(+), 161 deletions(-)

diff --git a/BizHawk.Client.Common/inputAdapters/BitwiseAdapters.cs b/BizHawk.Client.Common/inputAdapters/BitwiseAdapters.cs
index cd5a368b3b..0d47ae8a0c 100644
--- a/BizHawk.Client.Common/inputAdapters/BitwiseAdapters.cs
+++ b/BizHawk.Client.Common/inputAdapters/BitwiseAdapters.cs
@@ -1,9 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
-using BizHawk.Common;
 using BizHawk.Emulation.Common;
 
 namespace BizHawk.Client.Common
@@ -55,20 +51,24 @@ namespace BizHawk.Client.Common
 
 		public IController Source { get; set; }
 		public IController SourceOr { get; set; }
-		public ControllerDefinition Type { get { return Source.Type; } set { throw new InvalidOperationException(); } }
+
+		public ControllerDefinition Type
+		{
+			get { return Source.Type; }
+			set { throw new InvalidOperationException(); }
+		}
 
 		public bool this[string button]
 		{
 			get
 			{
-				return (Source != null ? Source[button] : false) |
-					(SourceOr != null ? SourceOr[button] : false);
+				return (Source != null ? Source[button] : false)
+					| (SourceOr != null ? SourceOr[button] : false);
 			}
 			set
 			{
 				throw new InvalidOperationException();
 			}
 		}
-
 	}
 }
diff --git a/BizHawk.Client.Common/inputAdapters/InputAdapters.cs b/BizHawk.Client.Common/inputAdapters/InputAdapters.cs
index 8e1aa27112..35a524d3d2 100644
--- a/BizHawk.Client.Common/inputAdapters/InputAdapters.cs
+++ b/BizHawk.Client.Common/inputAdapters/InputAdapters.cs
@@ -5,7 +5,6 @@ using System.Linq;
 using BizHawk.Common;
 using BizHawk.Common.StringExtensions;
 using BizHawk.Emulation.Common;
-using BizHawk.Emulation.Common.IEmulatorExtensions;
 
 namespace BizHawk.Client.Common
 {
@@ -418,158 +417,6 @@ namespace BizHawk.Client.Common
 		private List<string> _justPressed = new List<string>();
 	}
 
-	///// SuuperW: I'm leaving the old class in case I accidentally screwed something up
-	//public class AutoFireStickyXorAdapter : IController, ISticky
-	//{
-	//	public int On { get; set; }
-	//	public int Off { get; set; }
-	//	public WorkingDictionary<string, int> buttonStarts = new WorkingDictionary<string, int>();
-	//	public WorkingDictionary<string, int> lagStarts = new WorkingDictionary<string, int>(); // TODO: need a data structure not misc dictionaries
-
-	//	private readonly HashSet<string> _stickySet = new HashSet<string>();
-
-	//	public IController Source { get; set; }
-
-	//	public void SetOnOffPatternFromConfig()
-	//	{
-	//		On = Global.Config.AutofireOn < 1 ? 0 : Global.Config.AutofireOn;
-	//		Off = Global.Config.AutofireOff < 1 ? 0 : Global.Config.AutofireOff;
-	//	}
-
-	//	public AutoFireStickyXorAdapter()
-	//	{
-	//		//On = Global.Config.AutofireOn < 1 ? 0 : Global.Config.AutofireOn;
-	//		//Off = Global.Config.AutofireOff < 1 ? 0 : Global.Config.AutofireOff;
-	//		On = 1;
-	//		Off = 1;
-	//	}
-
-	//	public bool IsPressed(string button)
-	//	{
-	//		return this[button];
-	//	}
-
-	//	public bool this[string button]
-	//	{
-	//		get
-	//		{
-	//			var source = Source[button];
-
-	//			if (_stickySet.Contains(button))
-	//			{
-	//				var lagcount = 0;
-	//				if (Global.Emulator.CanPollInput() && Global.Config.AutofireLagFrames)
-	//				{
-	//					lagcount = Global.Emulator.AsInputPollable().LagCount;
-	//				}
-
-	//				var a = ((Global.Emulator.Frame - lagcount) - (buttonStarts[button] - lagStarts[button])) % (On + Off);
-	//				if (a < On)
-	//				{
-	//					return source ^= true;
-	//				}
-	//				else
-	//				{
-	//					return source ^= false;
-	//				}
-	//			}
-
-	//			return source;
-	//		}
-
-	//		set
-	//		{
-	//			throw new InvalidOperationException();
-	//		}
-	//	}
-
-	//	public ControllerDefinition Type { get { return Source.Type; } set { throw new InvalidOperationException(); } }
-	//	public bool Locked { get; set; } // Pretty much a hack, 
-
-	//	// dumb passthrough for floats, because autofire doesn't care about them
-	//	public float GetFloat(string name)
-	//	{
-	//		return Source.GetFloat(name);
-	//	}
-
-	//	public void SetSticky(string button, bool isSticky)
-	//	{
-	//		if (isSticky)
-	//		{
-	//			_stickySet.Add(button);
-	//			buttonStarts.Add(button, Global.Emulator.Frame);
-
-	//			if (Global.Emulator.CanPollInput())
-	//			{
-	//				lagStarts.Add(button, Global.Emulator.AsInputPollable().LagCount);
-	//			}
-	//			else
-	//			{
-	//				lagStarts.Add(button, 0);
-	//			}
-	//		}
-	//		else
-	//		{
-	//			_stickySet.Remove(button);
-	//			buttonStarts.Remove(button);
-	//			lagStarts.Remove(button);
-	//		}
-	//	}
-
-	//	public bool IsSticky(string button)
-	//	{
-	//		return this._stickySet.Contains(button);
-	//	}
-
-	//	public HashSet<string> CurrentStickies
-	//	{
-	//		get
-	//		{
-	//			return this._stickySet;
-	//		}
-	//	}
-
-	//	public void ClearStickies()
-	//	{
-	//		_stickySet.Clear();
-	//		buttonStarts.Clear();
-	//		lagStarts.Clear();
-	//	}
-
-	//	public void MassToggleStickyState(List<string> buttons)
-	//	{
-	//		foreach (var button in buttons.Where(button => !_justPressed.Contains(button)))
-	//		{
-	//			if (_stickySet.Contains(button))
-	//			{
-	//				_stickySet.Remove(button);
-	//			}
-	//			else
-	//			{
-	//				_stickySet.Add(button);
-	//			}
-	//		}
-
-	//		_justPressed = buttons;
-	//	}
-
-	//	/// <summary>
-	//	/// Determines if a sticky is current mashing the button itself,
-	//	/// If sticky is not set then false, if set, it returns true if the Source is not pressed, else false
-	//	/// </summary>
-	//	public bool StickyIsInEffect(string button)
-	//	{
-	//		if (Source.IsPressed(button))
-	//		{
-	//			return false;
-	//		}
-
-	//		return (IsPressed(button)); // Shortcut logic since we know the Source isn't pressed, Ispressed can only return true if the autofire sticky is in effect for this frame
-	//	}
-
-	//	private List<string> _justPressed = new List<string>();
-	//}
-
 	// commenting this out, it breaks the autofire hotkey
 	public class AutoFireStickyXorAdapter : IController, ISticky
 	{