You'd do that at the OS level, games don't need to re-invent that. Games do now ship with HDR calibration wizards to deal with the particular aspect of luminance range and SDR white point being totally undefined and inconsistent, at least for almost anything connected via HDMI or DisplayPort