If you need to modify the emulator, there's something wrong with your distro/drivers/compiler.
The code should work fine on Raspberry PI as-is.
PPSSPP works with X and without X.
If having issue with the SDL code, you can try the Qt code as well.
The code should work fine on Raspberry PI as-is.
PPSSPP works with X and without X.
If having issue with the SDL code, you can try the Qt code as well.

