diff --git a/docs/configuration.md b/docs/configuration.md index 57bb6d9f25a..fb36e1593d6 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1234,6 +1234,92 @@ editing the `conf` file in a text editor. Use the examples as reference. +### dd_mode_remapping + +
Description | +
+ Remap the requested resolution and FPS to another display mode. + Depending on the [dd_resolution_option](#dd_resolution_option) and + [dd_refresh_rate_option](#dd_refresh_rate_option) values, the following mapping + groups are available: +
+ If `final_*` field is left empty, the original value will not be remapped and either a requested, manual + or current value is used. However, at least one `final_*` must be set, otherwise the entry is considered + invalid. + @note{"Optimize game settings" must be enabled on client side for ANY entry with `resolution` + field to be considered.} + @note{First entry to be matched in the list is the one that will be used.} + @tip{`requested_resolution` and `final_resolution` can be omitted for `refresh_rate_only` group.} + @tip{`requested_fps` and `final_refresh_rate` can be omitted for `resolution_only` group.} + @note{Applies to Windows only.} + |
+ |
Default | +@code{} + dd_mode_remapping = { + "mixed": [], + "resolution_only": [], + "refresh_rate_only": [] + } + @endcode + | +|
Example | +@code{} + dd_mode_remapping = { + "mixed": [ + { + "requested_fps": "60", + "final_refresh_rate": "119.95", + "requested_resolution": "1920x1080", + "final_resolution": "2560x1440" + }, + { + "requested_fps": "60", + "final_refresh_rate": "120", + "requested_resolution": "", + "final_resolution": "" + } + ], + "resolution_only": [ + { + "requested_resolution": "1920x1080", + "final_resolution": "2560x1440" + } + ], + "refresh_rate_only": [ + { + "requested_fps": "60", + "final_refresh_rate": "119.95" + } + ] + }@endcode + | +
{{ $t('_common.do_cmd') }} | @@ -95,7 +92,7 @@ function removeCmd(index) {||||||||||
---|---|---|---|---|---|---|---|---|---|---|
diff --git a/src_assets/common/assets/web/configs/tabs/audiovideo/DisplayDeviceOptions.vue b/src_assets/common/assets/web/configs/tabs/audiovideo/DisplayDeviceOptions.vue index 379d1344bfc..ee2951733a7 100644 --- a/src_assets/common/assets/web/configs/tabs/audiovideo/DisplayDeviceOptions.vue +++ b/src_assets/common/assets/web/configs/tabs/audiovideo/DisplayDeviceOptions.vue @@ -7,8 +7,44 @@ const props = defineProps({ platform: String, config: Object }) - const config = ref(props.config) + +const REFRESH_RATE_ONLY = "refresh_rate_only" +const RESOLUTION_ONLY = "resolution_only" +const MIXED = "mixed" + +function canBeRemapped() { + return (config.value.dd_resolution_option === "auto" || config.value.dd_refresh_rate_option === "auto") + && config.value.dd_configuration_option !== "disabled"; +} + +function getRemappingType() { + // Assuming here that at least one setting is set to "auto" if other is not + if (config.value.dd_resolution_option !== "auto") { + return REFRESH_RATE_ONLY; + } + if (config.value.dd_refresh_rate_option !== "auto") { + return RESOLUTION_ONLY; + } + return MIXED; +} + +function addRemappingEntry() { + const type = getRemappingType(); + let template = {}; + + if (type !== RESOLUTION_ONLY) { + template["requested_fps"] = ""; + template["final_refresh_rate"] = ""; + } + + if (type !== REFRESH_RATE_ONLY) { + template["requested_resolution"] = ""; + template["final_resolution"] = ""; + } + + config.value.dd_mode_remapping[type].push(template); +} @@ -114,6 +150,76 @@ const config = ref(props.config) {{ $t('config.dd_config_revert_delay_desc') }} + + + |
+ {{ $t('config.dd_mode_remapping_requested_resolution') }} + | ++ {{ $t('config.dd_mode_remapping_requested_fps') }} + | ++ {{ $t('config.dd_mode_remapping_final_resolution') }} + | ++ {{ $t('config.dd_mode_remapping_final_refresh_rate') }} + | + ++ |
---|---|---|---|---|
+ + | ++ + | ++ + | ++ + | ++ + | +