forked from CastroFidel/PortWINE
		
	Update functions_helper
This commit is contained in:
		| @@ -509,7 +509,7 @@ init_wine_ver () { | ||||
|             rm -fr "${WINEDIR}/dist" | ||||
|         elif [ -f "${WINEDIR}/proton_dist.tar" ] ; then | ||||
|             unpack "${WINEDIR}/proton_dist.tar" "${WINEDIR}/" | ||||
|             for clear_dist_files in $(ls "${WINEDIR}" | sed -e "s/^bin$//g" | sed -e "s/^lib$//g" | sed -e "s/^lib64$//g" | sed -e "s/^share$//g" | sed -e "s/^version$//g") ; do  | ||||
|             for clear_dist_files in $(ls "${WINEDIR}" | sed -e "s/^bin$//g" | sed -e "s/^lib$//g" | sed -e "s/^lib64$//g" | sed -e "s/^share$//g" | sed -e "s/^version$//g") ; do | ||||
|                 rm -fr "${WINEDIR}/$clear_dist_files" | ||||
|             done | ||||
|         fi | ||||
| @@ -2245,6 +2245,46 @@ dgVoodooWatermark                   = false" > "${WINEPREFIX}/drive_c/windows/sy | ||||
|         [[ -z "${LAUNCH_PARAMETERS}" ]] && export LAUNCH_PARAMETERS+=" -eac-nop-loaded " | ||||
|     fi | ||||
|  | ||||
|     HIDRAW_VAR="$(grep "DisableHidraw" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg")" | ||||
|     SDL_VAR="$(grep "Enable SDL" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg")" | ||||
|     if [[ "${PW_DINPUT_PROTOCOL}" == "1" ]] ; then | ||||
|         var_winedlloverride_update "xinput1_1,xinput1_2,xinput1_3,xinput9_1_0=b;dinput=" | ||||
|  | ||||
|         if [[ "$HIDRAW_VAR" ]] \ | ||||
|         && [[ "$SDL_VAR" ]] | ||||
|         then | ||||
|             if [[ "${HIDRAW_VAR: -1}" != "1" ]] ; then | ||||
|                 sed -i "s/${HIDRAW_VAR}/${HIDRAW_VAR%?}1/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|  | ||||
|             if [[ "${SDL_VAR: -1}" != "1" ]] ; then | ||||
|                 sed -i "s/${SDL_VAR}/${SDL_VAR%?}1/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|         else | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 1 /f | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "Enable SDL" /t REG_DWORD /d 1 /f | ||||
|         fi | ||||
|     else | ||||
|         if [[ "$HIDRAW_VAR" ]] \ | ||||
|         && [[ "$SDL_VAR" ]] | ||||
|         then | ||||
|             if [[ "${HIDRAW_VAR: -1}" != "0" ]] ; then | ||||
|                 sed -i "s/${HIDRAW_VAR}/${HIDRAW_VAR%?}0/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|  | ||||
|             if [[ "${SDL_VAR: -1}" != "0" ]] ; then | ||||
|                 sed -i "s/${SDL_VAR}/${SDL_VAR%?}0/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|         else | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 0 /f | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "Enable SDL" /t REG_DWORD /d 0 /f | ||||
|         fi | ||||
|     fi | ||||
|  | ||||
|     pw_stop_progress_bar && | ||||
|     if ! check_start_from_steam ; then | ||||
|         pw_tray_icon | ||||
| @@ -2259,43 +2299,6 @@ dgVoodooWatermark                   = false" > "${WINEPREFIX}/drive_c/windows/sy | ||||
|         export DXVK_CONFIG_FILE="${PATH_TO_GAME}/dxvk.conf" | ||||
|     fi | ||||
|  | ||||
|     HIDRAW_VAR="$(grep "DisableHidraw" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg")" | ||||
|     SDL_VAR="$(grep "Enable SDL" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg")" | ||||
|     if [[ "${PW_INPUT_PROTOCOL}" == "1" ]] ; then | ||||
|         var_winedlloverride_update "xinput1_1,xinput1_2,xinput1_3,xinput9_1_0=b;dinput=" | ||||
|  | ||||
|         if [[ "$HIDRAW_VAR" ]] \ | ||||
|         && [[ "$SDL_VAR" ]] ; then | ||||
|             if [[ ! "${HIDRAW_VAR: -1}" = "1" ]] ; then | ||||
|                 sed -i "s/${HIDRAW_VAR}/${HIDRAW_VAR%?}1/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|  | ||||
|             if [[ ! "${SDL_VAR: -1}" = "1" ]] ; then | ||||
|                 sed -i "s/${SDL_VAR}/${SDL_VAR%?}1/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|         else | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 1 /f | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "Enable SDL" /t REG_DWORD /d 1 /f | ||||
|         fi | ||||
|     else | ||||
|         if [[ "$HIDRAW_VAR" ]] \ | ||||
|         && [[ "$SDL_VAR" ]] ; then | ||||
|             if [[ ! "${HIDRAW_VAR: -1}" = "0" ]] ; then | ||||
|                 sed -i "s/${HIDRAW_VAR}/${HIDRAW_VAR%?}0/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|             if [[ ! "${SDL_VAR: -1}" = "0" ]] ; then | ||||
|                 sed -i "s/${SDL_VAR}/${SDL_VAR%?}0/" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" | ||||
|             fi | ||||
|         else | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 0 /f | ||||
|             ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ | ||||
|             "${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "Enable SDL" /t REG_DWORD /d 0 /f | ||||
|         fi | ||||
|     fi | ||||
|  | ||||
|     if [[ "${PW_DISABLE_COMPOSITING}" == "1" ]] \ | ||||
|     && ! check_gamescope_session | ||||
|     then | ||||
| @@ -2752,7 +2755,7 @@ pw_gui_for_edit_db () { | ||||
|  | ||||
|     unset ADD_CHK_BOX_EDIT_DB | ||||
|  | ||||
|     PW_INPUT_PROTOCOL_INFO=$(eval_gettext 'Force use DirectInput/XInput protocol. Disabled — DInput, Enabled — XInput. It's only uses for game controllers and gamepads for example') | ||||
|     PW_DINPUT_PROTOCOL_INFO=$(eval_gettext 'Force use DirectInput protocol instead of XInput') | ||||
|     ENABLE_VKBASALT_INFO=$(eval_gettext 'Enable vkBasalt by default to improve graphics in games running on Vulkan. (The HOME hotkey disables vkbasalt)') | ||||
|     PW_NO_ESYNC_INFO=$(eval_gettext 'Do not use in-process synchronization primitives based on eventfd. (It is recommended not to change the value.)') | ||||
|     PW_NO_FSYNC_INFO=$(eval_gettext 'Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems without FUTEX_WAIT_MULTIPLE support) (It is recommended not to change the value)') | ||||
| @@ -2907,7 +2910,7 @@ A brief instruction: | ||||
|         export PW_WINE_CPU_TOPOLOGY="disabled" | ||||
|     fi | ||||
|     echo "pw_gui_for_edit_db PORTWINE_DB_FILE=$PORTWINE_DB_FILE" | ||||
|     edit_db_from_gui $@ LAUNCH_PARAMETERS PW_WINDOWS_VER PW_DLL_INSTALL WINEDLLOVERRIDES PW_WINE_CPU_TOPOLOGY GAMESCOPE_ARGS PW_MESA_GL_VERSION_OVERRIDE PW_LOCALE_SELECT | ||||
|     edit_db_from_gui $@ LAUNCH_PARAMETERS PW_WINDOWS_VER PW_DLL_INSTALL WINEDLLOVERRIDES PW_WINE_CPU_TOPOLOGY GAMESCOPE_ARGS PW_MESA_GL_VERSION_OVERRIDE PW_LOCALE_SELECT PW_CHOOSE_GAMEPAD_PROTOCOL | ||||
|     if [[ -z "$MANGOHUD_CONFIG" ]] ; then | ||||
|         MONITOR_HEIGHT="$(echo "$PW_SCREEN_RESOLUTION" | awk -F'x' '{print $2}')" | ||||
|         MH_FONT_SIZE="font_size=$(( MONITOR_HEIGHT / 45 ))" | ||||
| @@ -3945,7 +3948,7 @@ pw_edit_db () { | ||||
|     PW_VIRTUAL_DESKTOP PW_USE_TERMINAL PW_GUI_DISABLED_CS PW_USE_GAMEMODE PW_USE_D3D_EXTRAS PW_FIX_VIDEO_IN_GAME | ||||
|     PW_REDUCE_PULSE_LATENCY PW_USE_US_LAYOUT PW_USE_GSTREAMER PW_FORCE_LARGE_ADDRESS_AWARE PW_USE_SHADER_CACHE | ||||
|     PW_USE_WINE_DXGI PW_USE_EAC_AND_BE PW_USE_SYSTEM_VK_LAYERS PW_USE_OBS_VKCAPTURE PW_USE_GAMESCOPE PW_DISABLE_COMPOSITING | ||||
|     PW_USE_RUNTIME PW_INPUT_PROTOCOL | ||||
|     PW_USE_RUNTIME PW_DINPUT_PROTOCOL | ||||
|     " | ||||
|     if check_wayland_session ; then | ||||
|         rm_from_var PW_EDIT_DB_LIST "PW_USE_US_LAYOUT" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user