Преглед изворни кода

Disable keyboard shortcuts in release builds. Only used for debugging.

Stephen Damm пре 6 година
родитељ
комит
9c9b8488e5

+ 2 - 2
SongBrowserPlugin/DataAccess/Network/Downloader.cs

@@ -339,7 +339,7 @@ namespace SongBrowserPlugin
             else
             {
 #if DEBUG
-                Logger.Log("Received response from BeatSaver...");
+                Logger.Info("Received response from BeatSaver...");
 #endif
                 JSONNode node = JSON.Parse(wwwId.downloadHandler.text);
 
@@ -375,7 +375,7 @@ namespace SongBrowserPlugin
             else
             {
 #if DEBUG
-                Logger.Log("Received response from BeatSaver...");
+                Logger.Info("Received response from BeatSaver...");
 #endif
                 JSONNode node = JSON.Parse(wwwId.downloadHandler.text);
 

+ 2 - 0
SongBrowserPlugin/SongBrowserApplication.cs

@@ -211,6 +211,7 @@ namespace SongBrowserPlugin
             buttonInstance.onClick.Invoke();
         }
 
+#if DEBUG
         /// <summary>
         /// Map some key presses directly to UI interactions to make testing easier.
         /// </summary>
@@ -247,5 +248,6 @@ namespace SongBrowserPlugin
                 }                
             }
         }
+#endif
     }
 }

+ 2 - 2
SongBrowserPlugin/SongBrowserPlugin.sln

@@ -15,8 +15,8 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{6F9B6801-9F4B-4D1F-805D-271C95733814}.Debug|Any CPU.ActiveCfg = Release|Any CPU
-		{6F9B6801-9F4B-4D1F-805D-271C95733814}.Debug|Any CPU.Build.0 = Release|Any CPU
+		{6F9B6801-9F4B-4D1F-805D-271C95733814}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6F9B6801-9F4B-4D1F-805D-271C95733814}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6F9B6801-9F4B-4D1F-805D-271C95733814}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6F9B6801-9F4B-4D1F-805D-271C95733814}.Release|Any CPU.Build.0 = Release|Any CPU
 		{E5465EF3-B227-47BE-B7D1-624E0DAC275D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

+ 2 - 0
SongBrowserPlugin/UI/Browser/SongBrowserUI.cs

@@ -1213,6 +1213,7 @@ namespace SongBrowserPlugin.UI
             }
         }
 
+#if DEBUG
         /// <summary>
         /// Not normally called by the game-engine.  Dependent on SongBrowserApplication to call it.
         /// </summary>
@@ -1364,6 +1365,7 @@ namespace SongBrowserPlugin.UI
                 Logger.Exception("Debug Input caused Exception: ", e);
             }
         }
+#endif
     }
 }
  

+ 1 - 0
SongBrowserPlugin/UI/Keyboard/SearchKeyboardViewController.cs

@@ -78,6 +78,7 @@ namespace SongBrowserPlugin.UI
             //DismissViewControllerCoroutine(null, false);
         }
 
+
         /// <summary>
         /// Emulate keyboard support.
         /// </summary>

+ 2 - 0
SongBrowserPlugin/UI/Playlists/PlaylistFlowCoordinator.cs

@@ -253,6 +253,7 @@ namespace SongBrowserPlugin.UI
             Logger.Info("Done matching songs for all playlists...");
         }
 
+#if DEBUG
         /// <summary>
         /// Useful playlist navigation.
         /// Shift+Enter downloads.
@@ -277,5 +278,6 @@ namespace SongBrowserPlugin.UI
                 _playlistsNavigationController_didFinishEvent();
             }
         }
+#endif
     }
 }

+ 6 - 5
SongBrowserPlugin/UI/Playlists/PlaylistSelectionListViewController.cs

@@ -144,6 +144,11 @@ namespace SongBrowserPlugin.UI
 
             return _tableCell;
         }
+#if DEBUG
+        private void LateUpdate()
+        {
+            CheckDebugUserInput();
+        }
 
         private void CheckDebugUserInput()
         {
@@ -175,10 +180,6 @@ namespace SongBrowserPlugin.UI
                 this._songsTableView_DidSelectRowEvent(_songsTableView, _lastSelectedRow);
             }
         }
-
-        private void LateUpdate()
-        {
-            CheckDebugUserInput();
-        }
+#endif
     }
 }