Kenix3 / libultraship

Porting games to the PC
MIT License
90 stars 64 forks source link

Add CMake functionality to allow a port to modify what LUS uses for CVar names #527

Closed Malkierian closed 2 weeks ago

Malkierian commented 3 weeks ago

This utilizes CMake variables and definitions. On LUS's side, the definitions default to what they currently are; no changes without input from a port. They use set(CACHE) to allow for being lower priority.

All a port has to do is implement a custom cmake file that defines the same variables using non-cache set() so that the variable usage later finds them before looking in the cache for LUS's definitions.

EDIT: As a side note, only the prefixes for gControllers and gAdvancedResolution are configurable. Their sub-variables remain fixed in LUS.