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
4 changes: 3 additions & 1 deletion dylib/feats/compat_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1899,10 +1899,12 @@ winebus_lines() {
printf '%s\r\n' '[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WineBus]' "$hidraw_value" ''
}

# High Resolution doubles LogPixels and turning it off halves it
# High Resolution doubles LogPixels and turning it off halves it.
# NOTPROTON_RETINA_DPI=0 leaves it alone, since Wine shrinks the screen for games that are not DPI aware.
plan_logpixels() {
dpi_value=""
new_dpi=""
[ "${NOTPROTON_RETINA_DPI-}" != 0 ] || return 0
dpi_registry=/dev/null
[ ! -f "$WINEPREFIX/user.reg" ] || dpi_registry="$WINEPREFIX/user.reg"
read -r retina_was dpi <<EOF
Expand Down
12 changes: 11 additions & 1 deletion dylib/tests/settingscheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ run_in() {
WINESERVER="$work/wineserver" STEAM_COMPAT_DATA_PATH="$case_dir" \
SDL_GAMECONTROLLER_IGNORE_DEVICES="${IGNORE-}" \
SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT="${EXCEPT-}" \
NOTPROTON_RAW_CONTROLLERS="${RAW-}" NOTPROTON_DISABLE_HIDRAW="${HIDRAW-}" verb="${VERB-waitforexitandrun}" \
NOTPROTON_RAW_CONTROLLERS="${RAW-}" NOTPROTON_DISABLE_HIDRAW="${HIDRAW-}" \
NOTPROTON_RETINA_DPI="${DPI-}" verb="${VERB-waitforexitandrun}" \
FAKE_STATUS="$2" FAKE_CALLS="$case_dir/calls" FAKE_IMPORTED="$case_dir/imported" \
log="$case_dir/log" body="$body" \
sh -ec 'eval "$body"; import_prefix_settings; echo returned' \
Expand Down Expand Up @@ -261,6 +262,15 @@ VERB=run
again "" 0
same_file "a helper leaves them alone" "$work/helper" "$case_dir/imported"
unset VERB
DPI=0
user_reg '"RetinaMode"=-' '"LogPixels"=dword:00000060'
again 1 0
same_file "on with NOTPROTON_RETINA_DPI=0 keeps 96" "$work/retina-on" "$case_dir/imported"
is "nothing is logged" "" "$(grep video "$case_dir/log")"
user_reg '"RetinaMode"="y"' '"LogPixels"=dword:000000c0'
again 0 0
same_file "off with NOTPROTON_RETINA_DPI=0 keeps 192" "$work/retina-off" "$case_dir/imported"
unset DPI

echo "== settings already in the prefix"
mkdir -p "$work/cx/share/wine"
Expand Down
Loading