Skip to content

Commit e4ef82d

Browse files
committed
Run piracy check as early as possible
1 parent d7ca7c6 commit e4ef82d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

IPA.Injector/Injector.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ internal static void Main(string[] args)
4242

4343
SetupLibraryLoading();
4444

45-
EnsureDirectories();
46-
4745
// this is weird, but it prevents Mono from having issues loading the type.
4846
// IMPORTANT: NO CALLS TO ANY LOGGER CAN HAPPEN BEFORE THIS
4947
var unused = StandardLogger.PrintFilter;
@@ -57,16 +55,18 @@ internal static void Main(string[] args)
5755

5856
Default.Debug("Initializing logger");
5957

60-
SelfConfig.Load();
61-
DisabledConfig.Load();
62-
6358
if (AntiPiracy.IsInvalid(Environment.CurrentDirectory))
6459
{
6560
Default.Error("Invalid installation; please buy the game to run BSIPA.");
6661

6762
return;
6863
}
6964

65+
EnsureDirectories();
66+
67+
SelfConfig.Load();
68+
DisabledConfig.Load();
69+
7070
CriticalSection.Configure();
7171

7272
Logging.Logger.Injector.Debug("Prepping bootstrapper");

0 commit comments

Comments
 (0)