Skip to content

Commit ba4361c

Browse files
committed
Fix typo + wrong HRESULT return on IsGameRunning
1 parent b9bd686 commit ba4361c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SharedStatic.Generic.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static unsafe int LaunchGameFromGameManager(nint gameManagerP, nint plugi
5151

5252
if (gameManager == null)
5353
{
54-
throw new NullReferenceException("Cannot cast IGameException from the pointer, hence it gives null!");
54+
throw new NullReferenceException("Cannot cast IGameManager from the pointer, hence it gives null!");
5555
}
5656

5757
if (plugin == null)
@@ -97,11 +97,11 @@ public static unsafe int IsGameRunning(nint gameManagerP, out int isGameRunning)
9797

9898
if (gameManager == null)
9999
{
100-
return 0;
100+
throw new NullReferenceException("Cannot cast IGameManager from the pointer, hence it gives null!");
101101
}
102102

103103
isGameRunning = ThisPluginExport.IsGameRunningCore(gameManager) ? 1 : 0;
104-
return 1;
104+
return 0;
105105
}
106106
catch (Exception ex)
107107
{

0 commit comments

Comments
 (0)