Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 795 Bytes

README.md

File metadata and controls

27 lines (16 loc) · 795 Bytes

device_info.txt

This is a simple script + binary that is to be distributed with PortMaster, this is to allow Ports to get better info about the running device. This can allow resolutions to be put into config files and other various configurations that are currently quite awkward to do.

Example usage

# ^^^^^^^ Standard PortMaster header above ^^^^^^

source $controlfolder/device_info.txt

if [[ "${CFW_NAME}" == "JELOS" ]]; then
    # DO SOMETHING JELOS specific
fi

printf "[Resolution]\nWIDTH=${DISPLAY_WIDTH}\nHEIGHT=${DISPLAY_HEIGHT}\n" > some_config.ini

Building sdl_resolution

Unfortunately the only reliable way to get the device resolution is via a simple c program, this is all it takes to compile it.

./gcc -o sdl_resolution src/scres.c -lSDL2