Update envvars

This commit is contained in:
Yukino Song
2025-05-09 04:35:15 +08:00
parent 69e999d245
commit 6ee5f4ed0b
5 changed files with 10 additions and 11 deletions

View File

@@ -334,13 +334,8 @@ namespace proc {
// Sunshine Compatibility
_env["SUNSHINE_APP_ID"] = _app.id;
_env["SUNSHINE_APP_NAME"] = _app.name;
_env["SUNSHINE_CLIENT_UID"] = launch_session->unique_id;
_env["SUNSHINE_CLIENT_NAME"] = launch_session->device_name;
_env["SUNSHINE_CLIENT_WIDTH"] = std::to_string(render_width);
_env["SUNSHINE_CLIENT_HEIGHT"] = std::to_string(render_height);
_env["SUNSHINE_CLIENT_RENDER_WIDTH"] = std::to_string(launch_session->width);
_env["SUNSHINE_CLIENT_RENDER_HEIGHT"] = std::to_string(launch_session->height);
_env["SUNSHINE_CLIENT_SCALE_FACTOR"] = std::to_string(scale_factor);
_env["SUNSHINE_CLIENT_FPS"] = config::sunshine.envvar_compatibility_mode ? std::to_string(std::round((float)launch_session->fps / 1000.0f)) : fps_str;
_env["SUNSHINE_CLIENT_HDR"] = launch_session->enable_hdr ? "true" : "false";
_env["SUNSHINE_CLIENT_GCMAP"] = std::to_string(launch_session->gcmap);
@@ -349,7 +344,7 @@ namespace proc {
_env["APOLLO_APP_ID"] = _app.id;
_env["APOLLO_APP_NAME"] = _app.name;
_env["APOLLO_CLIENT_UID"] = launch_session->unique_id;
_env["APOLLO_CLIENT_UUID"] = launch_session->unique_id;
_env["APOLLO_CLIENT_NAME"] = launch_session->device_name;
_env["APOLLO_CLIENT_WIDTH"] = std::to_string(render_width);
_env["APOLLO_CLIENT_HEIGHT"] = std::to_string(render_height);
@@ -366,15 +361,19 @@ namespace proc {
switch (channelCount) {
case 2:
_env["SUNSHINE_CLIENT_AUDIO_CONFIGURATION"] = "2.0";
_env["APOLLO_CLIENT_AUDIO_CONFIGURATION"] = "2.0";
break;
case 6:
_env["SUNSHINE_CLIENT_AUDIO_CONFIGURATION"] = "5.1";
_env["APOLLO_CLIENT_AUDIO_CONFIGURATION"] = "5.1";
break;
case 8:
_env["SUNSHINE_CLIENT_AUDIO_CONFIGURATION"] = "7.1";
_env["APOLLO_CLIENT_AUDIO_CONFIGURATION"] = "7.1";
break;
}
_env["SUNSHINE_CLIENT_AUDIO_SURROUND_PARAMS"] = launch_session->surround_params;
_env["APOLLO_CLIENT_AUDIO_SURROUND_PARAMS"] = launch_session->surround_params;
if (!_app.output.empty() && _app.output != "null"sv) {
#ifdef _WIN32

View File

@@ -341,8 +341,8 @@
<td>{{ $t('apps.env_app_name') }}</td>
</tr>
<tr>
<td style="font-family: monospace">APOLLO_CLIENT_UID</td>
<td>{{ $t('apps.env_client_uid') }}</td>
<td style="font-family: monospace">APOLLO_CLIENT_UUID</td>
<td>{{ $t('apps.env_client_uuid') }}</td>
</tr>
<tr>
<td style="font-family: monospace">APOLLO_CLIENT_NAME</td>

View File

@@ -66,7 +66,7 @@
"env_client_height": "The Height requested by the client (int)",
"env_client_host_audio": "The client has requested host audio (true/false)",
"env_client_width": "The Width requested by the client (int)",
"env_client_uid": "UID of the client starting the stream (string)",
"env_client_uuid": "UUID of the client starting the stream (string)",
"env_client_name": "Name of the client starting the stream (string)",
"env_displayplacer_example": "Example - displayplacer for Resolution Automation:",
"env_qres_example": "Example - QRes for Resolution Automation:",

View File

@@ -66,7 +66,7 @@
"env_client_height": "A Altura da tela solicitada pelo cliente (inteiro)",
"env_client_host_audio": "O cliente solicitou o áudio do servidor (verdadeiro/falso)",
"env_client_width": "A Largura da tela solicitada pelo cliente (inteiro)",
"env_client_uid": "UID do cliente iniciando a transmissão (texto)",
"env_client_uuid": "UID do cliente iniciando a transmissão (texto)",
"env_client_name": "Nome do cliente iniciando a transmissão (texto)",
"env_displayplacer_example": "Exemplo - displayplacer para Automação de Resolução:",
"env_qres_example": "Exemplo - QRes para Automação de Resolução:",

View File

@@ -66,7 +66,7 @@
"env_client_height": "Höjd som begärts av klienten (int)",
"env_client_host_audio": "Klienten har begärt värdljud (true/false)",
"env_client_width": "Bredden begärd av klienten (int)",
"env_client_uid": "UID för klienten som startar strömmen (int)",
"env_client_uuid": "UID för klienten som startar strömmen (int)",
"env_client_name": "Namn på klienten som startar strömmen (string)",
"env_displayplacer_example": "Exempel - en displayplacer för automatiserad upplösning:",
"env_qres_example": "Exempel - QRes för upplösningsautomatisering:",