docs: explain shared IO configuration layout

The configured PIUIO or PIUBTN library path and the mapping-file lookup are separate behaviors. This distinction was unclear, making it difficult to understand what shared installations already supported and what the lookup added by PR #86 changed.

Document the per-game and shared-folder layouts, the keyboard X11 input-handler requirement, and the current search order: load the mapping beside the selected library first, then fall back to the folder containing the game's piu executable.
This commit is contained in:
voidderef-agent
2026-09-28 16:54:20 +02:00
committed by voidderef
parent 727f92ddb3
commit 7a72487742
2 changed files with 36 additions and 10 deletions
+19 -5
View File
@@ -7,6 +7,20 @@ The following libraries implement pumptool's PIUBTN API interface. Set the confi
in your hook configuration to point to the library you want to use, e.g.
`patch.piubtn.emu_lib=./ptapi-io-piubtn-null.so`.
The path can select a library installed beside one game or a library in a shared folder used by multiple games. For
keyboard input, the applicable X11 input-handler option must point to the same library.
The keyboard and joystick implementations first load their mapping file from the folder containing the selected
library. If that fails, they fall back to the folder containing the game's `piu` executable. This supports both of the
following layouts:
* Per-game: place the library and mapping file beside `piu` and use a relative path such as
`patch.piubtn.emu_lib=./ptapi-io-piubtn-keyboard.so`.
* Shared: place the library and mapping file in one common folder and configure every game with the same absolute path,
such as `patch.piubtn.emu_lib=/opt/pumptools/io/ptapi-io-piubtn-keyboard.so`.
When mapping files exist in both locations, the file beside the selected library takes precedence.
### Null: ptapi-io-piubtn-null.so
A null implementation for API dummy testing against libraries/applications calling API implementations.
@@ -20,8 +34,8 @@ Support all (USB) Joysticks and Gamepads that are detected by the Linux kernel.
Button mappings are configured by using the `ptapi-io-piubtn-joystick-conf` (this is an executable!) tool. You might
have to `chmod +x ptapi-io-piubtn-joystick-conf` it prior being able to run it: `./ptapi-io-piubtn-joystick-conf`. Run
the tool and follow the instructions. Once successfully completed, a `piubtn-joystick-conf.bin` configuration file is
located in the same folder. This must be located next to the `ptapi-io-piubtn-joystick.so` file which should be located
next to your `piu` executable.
located in the same folder. Keep it beside `ptapi-io-piubtn-joystick.so`, either in the game's folder or in a shared
folder.
Configure your `hook.conf` file accordingly:
```
@@ -34,8 +48,8 @@ Support for inputs via your standard keyboard using the X11 API.
Button mappings are configured by using the `ptapi-io-piubtn-keyboard-conf` (this is an executable!) tool. You might
have to `chmod +x ptapi-io-piubtn-keyboard-conf` it prior being able to run it: `./ptapi-io-piubtn-keyboard-conf`. Run
the tool and follow the instructions. Once successfully completed, a `piubtn-keyboard-conf.bin` configuration file is
located in the same folder. This must be located next to the `ptapi-io-piubtn-keyboard.so` file which should be located
next to your `piu` executable.
located in the same folder. Keep it beside `ptapi-io-piubtn-keyboard.so`, either in the game's folder or in a shared
folder.
Configure your `hook.conf` file accordingly:
```
@@ -55,4 +69,4 @@ The [piubtn header](../../src/api/ptapi/io/piubtn.h) contains all the prototypes
provide your own implementation for a PIUBTN. Checkout the header file for documentation.
Checkout the [stub implementation](../../dist/api/ptapi-io-piubtn-stub.c) to get started with a simple example.
Instructions are located in the header comment of the file.
Instructions are located in the header comment of the file.
+17 -5
View File
@@ -6,6 +6,20 @@ is supported by all games up to this day.
The following libraries implement pumptool's PIUIO API interface. Set the configuration value `patch.piuio.emu_lib`
in your hook configuration to point to the library you want to use, e.g. `patch.piuio.emu_lib=./ptapi-io-piuio-null.so`.
The path can select a library installed beside one game or a library in a shared folder used by multiple games. For
keyboard input, `patch_hook_main_loop.x11_input_handler` must point to the same library.
The keyboard and joystick implementations first load their mapping file from the folder containing the selected
library. If that fails, they fall back to the folder containing the game's `piu` executable. This supports both of the
following layouts:
* Per-game: place the library and mapping file beside `piu` and use a relative path such as
`patch.piuio.emu_lib=./ptapi-io-piuio-keyboard.so`.
* Shared: place the library and mapping file in one common folder and configure every game with the same absolute path,
such as `patch.piuio.emu_lib=/opt/pumptools/io/ptapi-io-piuio-keyboard.so`.
When mapping files exist in both locations, the file beside the selected library takes precedence.
### Null: ptapi-io-piuio-null.so
A null implementation for API dummy testing against libraries/applications calling API implementations.
@@ -19,8 +33,7 @@ Support all (USB) Joysticks and Gamepads that are detected by the Linux kernel.
Button mappings are configured by using the `ptapi-io-piuio-joystick-conf` (this is an executable!) tool. You might have
to `chmod +x ptapi-io-piuio-joystick-conf` it prior being able to run it: `./ptapi-io-piuio-joystick-conf`. Run the tool
and follow the instructions. Once successfully completed, a `piuio-joystick-conf.bin` configuration file is located in
the same folder. This must be located next to the `ptapi-io-piuio-joystick.so` file which should be located next to your
`piu` executable.
the same folder. Keep it beside `ptapi-io-piuio-joystick.so`, either in the game's folder or in a shared folder.
Configure your `hook.conf` file accordingly:
```
@@ -33,8 +46,7 @@ Support for inputs via your standard keyboard using the X11 API.
Button mappings are configured by using the `ptapi-io-piuio-keyboard-conf` (this is an executable!) tool. You might have
to `chmod +x ptapi-io-piuio-keyboard-conf` it prior being able to run it: `./ptapi-io-piuio-keyboard-conf`. Run the tool
and follow the instructions. Once successfully completed, a `piuio-keyboard-conf.bin` configuration file is located in
the same folder. This must be located next to the `ptapi-io-piuio-keyboard.so` file which should be located next to your
`piu` executable.
the same folder. Keep it beside `ptapi-io-piuio-keyboard.so`, either in the game's folder or in a shared folder.
Configure your `hook.conf` file accordingly:
```
@@ -54,4 +66,4 @@ The [piuio header](../../src/api/ptapi/io/piuio.h) contains all the prototypes t
provide your own implementation for a PIUIO. Checkout the header file for documentation.
Checkout the [stub implementation](../../dist/api/ptapi-io-piuio-stub.c) to get started with a simple example.
Instructions are located in the header comment of the file.
Instructions are located in the header comment of the file.