Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/backend/nvhttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,14 @@ NvHTTP::startApp(QString verb,
"&minBrightness="+QString::number(remoteStreamConfig.minBrightness, 'f', 6)+
"&maxAverageBrightness="+QString::number(remoteStreamConfig.maxAverageBrightness, 'f', 3);
}
if (remoteStreamConfig.sdrWhiteBrightness >= 50.0f &&
remoteStreamConfig.sdrWhiteBrightness <= 1000.0f) {
// Foundation Sunshine parses this extension as an integer number of
// nits. It uses the value to re-anchor SDR-referred content before
// converting the host's scRGB desktop to the negotiated HDR transfer.
query += "&sdrBrightness="+
QString::number(qRound(remoteStreamConfig.sdrWhiteBrightness));
}

query += LiGetLaunchUrlQueryParameters();

Expand Down
5 changes: 4 additions & 1 deletion app/backend/remotecomputer.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ class RemoteStreamConfig {
float maxBrightness;
float minBrightness;
float maxAverageBrightness;
float sdrWhiteBrightness;

RemoteStreamConfig(
bool remoteResolution, int remoteResolutionWidth, int remoteResolutionHeight,
bool remoteFps, int remoteFpsRate,
int originalStreamWidth, int originalStreamHeight,
float maxBrightness = 0, float minBrightness = 0, float maxAverageBrightness = 0)
float maxBrightness = 0, float minBrightness = 0, float maxAverageBrightness = 0,
float sdrWhiteBrightness = 0)
{
this->remoteResolution = remoteResolution;
this->remoteResolutionWidth = remoteResolutionWidth;
Expand All @@ -29,5 +31,6 @@ class RemoteStreamConfig {
this->maxBrightness = maxBrightness;
this->minBrightness = minBrightness;
this->maxAverageBrightness = maxAverageBrightness;
this->sdrWhiteBrightness = sdrWhiteBrightness;
}
};
Loading
Loading