Add option to toggle envvar compatibility mode
This commit is contained in:
@@ -577,6 +577,7 @@ namespace config {
|
||||
false, // hide_tray_controls
|
||||
true, // enable_pairing
|
||||
true, // enable_discovery
|
||||
false, // envvar_compatibility_mode
|
||||
"en", // locale
|
||||
2, // min_log_level
|
||||
0, // flags
|
||||
@@ -1279,6 +1280,7 @@ namespace config {
|
||||
bool_f(vars, "hide_tray_controls", sunshine.hide_tray_controls);
|
||||
bool_f(vars, "enable_pairing", sunshine.enable_pairing);
|
||||
bool_f(vars, "enable_discovery", sunshine.enable_discovery);
|
||||
bool_f(vars, "envvar_compatibility_mode", sunshine.envvar_compatibility_mode);
|
||||
bool_f(vars, "notify_pre_releases", sunshine.notify_pre_releases);
|
||||
|
||||
int port = sunshine.port;
|
||||
|
||||
@@ -256,6 +256,7 @@ namespace config {
|
||||
bool hide_tray_controls;
|
||||
bool enable_pairing;
|
||||
bool enable_discovery;
|
||||
bool envvar_compatibility_mode;
|
||||
std::string locale;
|
||||
int min_log_level;
|
||||
std::bitset<flag::FLAG_SIZE> flags;
|
||||
|
||||
@@ -341,7 +341,7 @@ namespace proc {
|
||||
_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"] = fps_str;
|
||||
_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);
|
||||
_env["SUNSHINE_CLIENT_HOST_AUDIO"] = launch_session->host_audio ? "true" : "false";
|
||||
|
||||
@@ -381,8 +381,13 @@
|
||||
<td>{{ $t('apps.env_client_audio_config') }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="form-text" v-if="platform === 'windows'"><b>{{ $t('apps.env_qres_example') }}</b>
|
||||
<pre>cmd /C <{{ $t('apps.env_qres_path') }}>\QRes.exe /X:%APOLLO_CLIENT_WIDTH% /Y:%APOLLO_CLIENT_HEIGHT% /R:%APOLLO_CLIENT_FPS%</pre>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<i class="fa-solid fa-xl fa-circle-info"></i> {{ $t('apps.env_sunshine_compatibility') }}
|
||||
</div>
|
||||
|
||||
<div class="form-text" v-if="platform === 'windows'"><b>{{ $t('apps.env_rtss_cli_example') }}</b>
|
||||
<pre>cmd /C \path\to\rtss-cli.exe limit:set %APOLLO_CLIENT_FPS%</pre>
|
||||
</div>
|
||||
<div class="form-text" v-else-if="platform === 'linux'"><b>{{ $t('apps.env_xrandr_example') }}</b>
|
||||
<pre>sh -c "xrandr --output HDMI-1 --mode \"${APOLLO_CLIENT_WIDTH}x${APOLLO_CLIENT_HEIGHT}\" --rate ${APOLLO_CLIENT_FPS}"</pre>
|
||||
|
||||
@@ -43,6 +43,14 @@ const config = ref(props.config)
|
||||
default="true"
|
||||
></Checkbox>
|
||||
|
||||
<!-- ENVVAR compatibility mode -->
|
||||
<Checkbox class="mb-3"
|
||||
id="envvar_compatibility_mode"
|
||||
locale-prefix="config"
|
||||
v-model="config.envvar_compatibility_mode"
|
||||
default="false"
|
||||
></Checkbox>
|
||||
|
||||
<!-- HEVC Support -->
|
||||
<div class="mb-3">
|
||||
<label for="hevc_mode" class="form-label">{{ $t('config.hevc_mode') }}</label>
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
"env_displayplacer_example": "Example - displayplacer for Resolution Automation:",
|
||||
"env_qres_example": "Example - QRes for Resolution Automation:",
|
||||
"env_qres_path": "qres path",
|
||||
"env_rtss_cli_example": "Example - rtss-cli for FPS Limitation:",
|
||||
"env_sunshine_compatibility": "Environment variables starting with \"SUNSHINE_\" are deprecated but still kept for compatibility with Sunshine related tools. The SUNSHINE_CLIENT_FPS variable is modified to FLOAT for fractional refresh rate support(especially for Special-K), if your script/tool can't take floating number input, go to Advanced tab to enable \"ENVVAR compatibility mode\". APOLLO_CLIENT_FPS is always FLOAT type.",
|
||||
"env_var_name": "Var Name",
|
||||
"env_vars_about": "About Environment Variables",
|
||||
"env_vars_desc": "All commands get these environment variables by default:",
|
||||
@@ -238,6 +240,8 @@
|
||||
"encoder": "Force a Specific Encoder",
|
||||
"encoder_desc": "Force a specific encoder, otherwise Apollo will select the best available option. Note: If you specify a hardware encoder on Windows, it must match the GPU where the display is connected.",
|
||||
"encoder_software": "Software",
|
||||
"envvar_compatibility_mode": "ENVVAR compatibility mode",
|
||||
"envvar_compatibility_mode_desc": "Enable compatibility mode for environment variables. This will modify the behavior of certain environment variables to be more compatible with older tools.",
|
||||
"external_ip": "External IP",
|
||||
"external_ip_desc": "If no external IP address is given, Apollo will automatically detect external IP",
|
||||
"fallback_mode": "Fallback Display Mode",
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
"env_displayplacer_example": "示例 - 使用 displayplacer 自动更改分辨率:",
|
||||
"env_qres_example": "示例 - 使用 QRes 自动更改分辨率:",
|
||||
"env_qres_path": "QRes 路径",
|
||||
"env_rtss_cli_example": "示例 - 使用 rtss-cli 限制 FPS:",
|
||||
"env_sunshine_compatibility": "以 \"SUNSHINE_\" 开头的环境变量已弃用,但仍保留它们以确保对 Sunshine 相关工具的兼容。SUNSHINE_CLIENT_FPS 变量已修改为 FLOAT 以支持小数刷新率(特别适用于 Special-K),如果您的脚本/工具无法接受浮点数输入,请前往 Advanced 选项卡启用 \"环境变量兼容模式\"。APOLLO_CLIENT_FPS 则始终为 FLOAT 类型。",
|
||||
"env_var_name": "变量名称",
|
||||
"env_vars_about": "关于环境变量",
|
||||
"env_vars_desc": "默认情况下,所有命令都会得到这些环境变量:",
|
||||
@@ -233,6 +235,8 @@
|
||||
"encoder": "强制指定编码器",
|
||||
"encoder_desc": "强制指定一个特定编码器,否则 Apollo 将选择最佳可用选项。注意:如果您在 Windows 上指定了硬件编码器,它必须匹配连接显示器的 GPU。",
|
||||
"encoder_software": "软件",
|
||||
"envvar_compatibility_mode": "环境变量兼容模式",
|
||||
"envvar_compatibility_mode_desc": "启用环境变量兼容模式。这将修改某些环境变量的行为,以更好地与旧工具兼容。",
|
||||
"external_ip": "外部 IP",
|
||||
"external_ip_desc": "如果没有指定外部 IP 地址,Apollo 将自动检测外部 IP",
|
||||
"fallback_mode": "备用显示参数",
|
||||
|
||||
Reference in New Issue
Block a user