Skip to content

Commit

Permalink
Try initFlat
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkieSwirl committed Mar 17, 2024
1 parent e423fea commit 387176c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public static boolean restartAppIfNecessary(int appId) throws SteamException {
return nativeRestartAppIfNecessary(appId);
}

public static boolean initEx() throws SteamException {
return init() == InitResult.OK;
public static boolean init() throws SteamException {
return initFlat() == InitResult.OK;
}

public static InitResult init() throws SteamException {
public static InitResult initFlat() throws SteamException {

if (!isNativeAPILoaded) {
throw new SteamException("Native libraries not loaded.\nEnsure to call SteamAPI.loadLibraries() first!");
Expand Down Expand Up @@ -106,7 +106,7 @@ static boolean isIsNativeAPILoaded() {
return false;
}
return SteamAPI_InitEx(nullptr);
return SteamAPI_InitFlat(nullptr);
*/

private static native void nativeShutdown(); /*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private boolean runAsClient() throws SteamException {

System.out.println("Initialise Steam client API ...");

SteamAPI.InitResult result = SteamAPI.init();
SteamAPI.InitResult result = SteamAPI.initFlat();
if (result != SteamAPI.InitResult.OK) {
System.err.println("SteamAPI.initEx() failed: " + result.name());
SteamAPI.printDebugInfo(System.err);
Expand Down Expand Up @@ -167,7 +167,7 @@ private boolean runAsGameServer(boolean dedicated) throws SteamException {

System.out.println("Initialise Steam client API ...");

if (!SteamAPI.initEx()) {
if (!SteamAPI.init()) {
SteamAPI.printDebugInfo(System.err);
return false;
}
Expand Down

0 comments on commit 387176c

Please sign in to comment.