Skip to content

Commit 2c52064

Browse files
committed
📦 Added readme for natives
1 parent 13eeb8c commit 2c52064

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

common/src/main/java/com/mrcrayfish/controllable/client/input/sdl2/SDL2ControllerManager.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ public class SDL2ControllerManager extends AdaptiveControllerManager
5353
Path sdl = natives.resolve("SDL");
5454
Files.createDirectories(sdl);
5555
SdlNativeLibraryLoader.setExtractionPath(sdl);
56+
57+
// Add a readme to the natives directory for users
58+
Path readMeFile = natives.resolve("README.txt");
59+
if(!Files.exists(readMeFile))
60+
{
61+
Files.writeString(readMeFile, """
62+
This directory holds the natives for Controllable, which are used to interface
63+
with game controllers and read their inputs. It is safe to delete, just make sure
64+
the game is closed as the natives may be loaded; preventing you from deleting them.
65+
If you are developing a modpack, make sure to exclude this directory.""");
66+
}
5667
}
5768
catch(IOException e)
5869
{

0 commit comments

Comments
 (0)