mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
sceSystemServiceGetHdrToneMapLuminance was NotImplemented. Titles read it at startup to set up their HDR tone mapping. The presenter always outputs through a B8G8R8A8 sRGB-nonlinear swapchain, so the display range the title has to map into is SDR: the maximum and full-frame maximum luminance are the 100 cd/m2 SDR reference white and the minimum is 0. A null output pointer returns SYSTEM_SERVICE_ERROR_PARAMETER like the other getters here.
21 lines
726 B
C++
21 lines
726 B
C++
#include "SceTypes.hpp"
|
|
#include "prx/libSceSystemService/SystemService.hpp"
|
|
#include <cstdlib>
|
|
|
|
extern "C" int APS5_VABI sceSystemServiceGetHdrToneMapLuminance(SystemServiceHdrToneMapLuminance* luminance);
|
|
|
|
namespace {
|
|
|
|
void Require(bool value) { if (!value) std::abort(); }
|
|
|
|
}
|
|
|
|
int main() {
|
|
Require(sceSystemServiceGetHdrToneMapLuminance(nullptr) == SYSTEM_SERVICE_ERROR_PARAMETER);
|
|
SystemServiceHdrToneMapLuminance luminance{-1.0f, -1.0f, -1.0f};
|
|
Require(sceSystemServiceGetHdrToneMapLuminance(&luminance) == SYSTEM_SERVICE_OK);
|
|
Require(luminance.max_full_frame_tone_map_luminance == 100.0f);
|
|
Require(luminance.max_tone_map_luminance == 100.0f);
|
|
Require(luminance.min_tone_map_luminance == 0.0f);
|
|
}
|