Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batocera-wine: disable hidraw by default #13083

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -11119,6 +11119,12 @@ wine:
choices:
"Off": 0
"On (Default)": 1
enable_hidraw:
prompt: ENABLE HIDRAW
description: Enable gamepad HID raw access. This allow modern game to use special gamepad features (like gyroscope for example), but can break older games with x-input support only.
choices:
"Off (Default)": 0
"On": 1
dxvk_hud:
group: ADVANCED OPTIONS
prompt: DXVK HUD
Expand Down
16 changes: 16 additions & 0 deletions package/batocera/utils/batocera-wine/batocera-wine
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ wine_options() {
HEAP_DELAY_FREE="$(get_setting heap_delay_free "${SYSTEM}" "${ROMGAMENAME}")"
HIDE_NVIDIA_GPU="$(get_setting hide_nvidia_gpu "${SYSTEM}" "${ROMGAMENAME}")"
ENABLE_NVAPI="$(get_setting enable_nvapi "${SYSTEM}" "${ROMGAMENAME}")"
ENABLE_HIDRAW="$(get_setting enable_hidraw "${SYSTEM}" "${ROMGAMENAME}")"
DXVK_RESET_CACHE="$(get_setting dxvk_reset_cache "${SYSTEM}" "${ROMGAMENAME}")"
WINE_NTFS="$(get_setting wine_ntfs "${SYSTEM}" "${ROMGAMENAME}")"
WINE_DEBUG="$(get_setting wine_debug "${SYSTEM}" "${ROMGAMENAME}")"
Expand Down Expand Up @@ -178,6 +179,9 @@ wine_options() {

export VKD3D_SHADER_CACHE_PATH="/userdata/system/cache"

export WINE_ENABLE_HIDRAW=0
[[ "${ENABLE_HIDRAW}" = 1 ]] && WINE_ENABLE_HIDRAW=1

export WINE_FULLSCREEN_FSR=0
[[ "${FSR}" = 1 ]] && unset WINE_FULLSCREEN_FSR

Expand Down Expand Up @@ -349,6 +353,18 @@ reg_install() {
mv "${USER_DIR}/regs" "${USER_DIR}/regs.bak" || return 1
fi

if [[ "${WINE_ENABLE_HIDRAW}" = 1 ]]; then
if ! grep -q "\"DisableHidraw\"=dword:00000000" "${WINEPOINT}/system.reg"; then
WINEPREFIX=${WINEPOINT} "${WINE}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 0 /f
waitWineServer
fi
else
if ! grep -q "\"DisableHidraw\"=dword:00000001" "${WINEPOINT}/system.reg"; then
WINEPREFIX=${WINEPOINT} "${WINE}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 1 /f
waitWineServer
fi
fi

return 0
}

Expand Down