Browse Source

Fixed error in log thread when config isn't loaded yet

Fixed game version detection
pull/46/head
Anairkoen Schno 5 years ago
parent
commit
f1715d7401
4 changed files with 4 additions and 6 deletions
  1. +2
    -2
      IPA.Loader/Logging/StandardLogger.cs
  2. +2
    -4
      IPA.Loader/Utilities/BeatSaber.cs
  3. BIN
      Refs/BeatSaberCustomUI.dll
  4. BIN
      Refs/UnityEngine.CoreModule.dll

+ 2
- 2
IPA.Loader/Logging/StandardLogger.cs View File

@ -294,9 +294,9 @@ namespace IPA.Logging
} }
} }
var debugConfig = SelfConfig.SelfConfigRef.Value.Debug;
var debugConfig = SelfConfig.SelfConfigRef?.Value?.Debug;
if (debugConfig.HideMessagesForPerformance
if (debugConfig != null && debugConfig.HideMessagesForPerformance
&& logQueue.Count > debugConfig.HideLogThreshold) && logQueue.Count > debugConfig.HideLogThreshold)
{ // spam filtering (if queue has more tha 512 elements) { // spam filtering (if queue has more tha 512 elements)
logWaitEvent.Reset(); // pause incoming log requests logWaitEvent.Reset(); // pause incoming log requests


+ 2
- 4
IPA.Loader/Utilities/BeatSaber.cs View File

@ -71,11 +71,9 @@ namespace IPA.Utilities
private static bool FindSteamVRAsset() private static bool FindSteamVRAsset()
{ {
// these require assembly qualified names.... // these require assembly qualified names....
var steamVRCamera = Type.GetType("SteamVR_Camera, Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", false);
var steamVRExternalCamera = Type.GetType("SteamVR_ExternalCamera, Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", false);
var steamVRFade = Type.GetType("SteamVR_Fade, Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", false);
var steamUser = Type.GetType("Steamworks.SteamUser, Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", false);
return steamVRCamera != null && steamVRExternalCamera != null && steamVRFade != null;
return steamUser != null;
} }
} }
} }

BIN
Refs/BeatSaberCustomUI.dll View File


BIN
Refs/UnityEngine.CoreModule.dll View File


Loading…
Cancel
Save