1. Create a shared library. This shared library should contain a function with the same name and signature that strace shows the program is calling, and should return the data you want the program to use.
2. When starting the game, use LD_PRELOAD to force your shared library to load before the game loads it.
Now, when the game calls the function, it will get your version of the function instead of glibc's wrapper of the system call.
(Though I still do plan to write a hook to fix games like Dungeons of Dredmor which only allow you to select valid fullscreen resolutions for windowed mode, which keeps them from playing nicely with a MetaModes line that locks the desktop resolution. That one, I actually started work on years ago, but couldn't figure out how to write a dlsym(RTLD_NEXT, "SDL_ListModes") function pointer signature that the compiler would accept... and then other things kept coming up so I've just not been playing Dredmor.)
I figure that, since the core of my launcher is already being ported from Python to Rust for reusability and stricter type checks, I might as well write the LD_PRELOAD helper using something like redhook ( https://crates.io/crates/redhook ) or hooky ( https://crates.io/crates/hooky ) so I get a language I'm more familiar with and a function pointer syntax that's not so squirrely.