|
1 | 1 | using System.Collections.Generic; |
| 2 | +#if DEBUG |
| 3 | +using System.Diagnostics; |
| 4 | +#endif |
2 | 5 | using System.Linq; |
3 | 6 |
|
4 | 7 | namespace BizHawk.Client.Common |
@@ -132,7 +135,7 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin |
132 | 135 | Bind("TAStudio", "Delete Branch", "Alt+Delete"); |
133 | 136 | Bind("TAStudio", "Show Cursor"); |
134 | 137 | Bind("TAStudio", "Toggle Follow Cursor", "Shift+F"); |
135 | | - Bind("TAStudio", "Toggle Auto-Restore", "Shift+R"); |
| 138 | + Bind("TAStudio", "Toggle Auto-Restore", "Alt+R"); |
136 | 139 | Bind("TAStudio", "Seek To Green Arrow", "R"); |
137 | 140 | Bind("TAStudio", "Toggle Turbo Seek", "Shift+S"); |
138 | 141 | Bind("TAStudio", "Undo", "Ctrl+Z"); // TODO: these are getting not unique enough |
@@ -198,6 +201,15 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin |
198 | 201 |
|
199 | 202 | AllHotkeys = dict; |
200 | 203 | Groupings = dict.Values.Select(static info => info.TabGroup).Distinct().ToList(); |
| 204 | + |
| 205 | +#if DEBUG |
| 206 | + var bindings = dict.Values |
| 207 | + .Where(static info => !info.DisplayName.StartsWith("RA ") && !string.IsNullOrEmpty(info.DefaultBinding)) |
| 208 | + .Select(static info => info.DefaultBinding); |
| 209 | +#pragma warning disable MA0031 // Optimize Enumerable.Count() usage |
| 210 | + Debug.Assert(bindings.Count() == bindings.Distinct().Count(), "Do not default bind multiple hotkeys to the same button combination."); |
| 211 | +#pragma warning restore MA0031 // Optimize Enumerable.Count() usage |
| 212 | +#endif |
201 | 213 | } |
202 | 214 |
|
203 | 215 | public static void ResolveWithDefaults(IDictionary<string, string> dict) |
|
0 commit comments