forked from Clones/Controlify
Finish & fix abstract controller manager + optimize hashmaps in codebase + no SDL screen
This commit is contained in:
@ -54,6 +54,11 @@ public class SDL2NativesManager {
|
||||
|
||||
attemptedLoad = true;
|
||||
|
||||
if (!isSupportedOnThisPlatform()) {
|
||||
Log.LOGGER.warn("No native library for current platform, skipping SDL2 load");
|
||||
return initFuture = CompletableFuture.completedFuture(false);
|
||||
}
|
||||
|
||||
Path localLibraryPath = getNativesFolderPath().resolve(Target.CURRENT.getArtifactName());
|
||||
|
||||
if (Files.exists(localLibraryPath)) {
|
||||
@ -178,6 +183,10 @@ public class SDL2NativesManager {
|
||||
return attemptedLoad;
|
||||
}
|
||||
|
||||
public static boolean isSupportedOnThisPlatform() {
|
||||
return Target.CURRENT.hasNativeLibrary();
|
||||
}
|
||||
|
||||
private static Path getNativesFolderPath() {
|
||||
Path nativesFolderPath = FabricLoader.getInstance().getGameDir();
|
||||
ControlifyConfig config = Controlify.instance().config();
|
||||
|
Reference in New Issue
Block a user