diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 5b42235a..ef9a0d6e 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -671,8 +671,8 @@ pw_mangohud_check () { print_info "Portable MANGOHUD is enabled" else print_info "System MANGOHUD is enabled" + export PW_MANGOHUD_SLR='MANGOHUD=1' fi - export PW_MANGOHUD_SLR='MANGOHUD=1' MANGOHUD_LIB_NAME="libMangoHud.so" if [[ "${PW_VULKAN_USE}" = "0" ]] ; then MANGOHUD_LIB_NAME="libMangoHud_dlsym.so:libMangoHud_opengl.so:${MANGOHUD_LIB_NAME}" @@ -682,7 +682,7 @@ pw_mangohud_check () { else export PW_LD_PRELOAD="${MANGOHUD_LIB_NAME}" fi else - export PW_MANGOHUD_SLR="" + export PW_MANGOHUD_SLR='' print_info "MANGOHUD is disabled" fi return 0 @@ -2096,13 +2096,46 @@ start_portwine () { # WINED3D VULKAN (DAMAVAND) print_info "Use DAMAVAND (DirectX to wined3d vulkan)" PATH_TO_VKD3D_FILES="${PW_VULKAN_DIR}/vkd3d-proton-${VKD3D_GIT_VER}" - CP_DGV2_FILES="ddraw d3dimm d3d8 d3d9 glide glide2x glide3x" CP_VKD3D_FILES="libvkd3d-1 libvkd3d-shader-1" CP_WINE_FILES="d3d11 d3d10core d3d10_1 d3d10 dxgi d3d12 d3d12core" export WINE_D3D_CONFIG="renderer=vulkan" + export PW_DGV2_FORCE_ENABLE="1" ;; esac + # force use all DGVOODOO2 libs and 64bit + if [[ "${PW_DGV2_FORCE_ENABLE}" == "1" ]] ; then + unset CP_DGV2_FILES + CP_DGV2_FILES="ddraw d3dimm d3d8 d3d9 glide glide2x glide3x" + try_copy_file "${PW_VULKAN_DIR}/dgvoodoo2-${DGV2_VER}/x64/d3d9.dll" "${WINEPREFIX}/drive_c/windows/system32/" + try_copy_file "${PW_VULKAN_DIR}/dgvoodoo2-${DGV2_VER}/dgVoodoo.conf" "${WINEPREFIX}/drive_c/windows/system32/" + dgv2conf64="${WINEPREFIX}/drive_c/windows/system32/dgVoodoo.conf" + fi + + # force disable all DGVOODOO2 libs and 64bit + if [[ "${PW_DGV2_FORCE_DISABLE}" == "1" ]] ; then + unset PW_DGV2_FORCE_ENABLE CP_DGV2_FILES CP_WINE_FILES dgv2conf64 + if [[ "${PW_VULKAN_USE}" == "0" ]] ; then + CP_WINE_FILES="ddraw d3d8 d3d11 d3d10core d3d10_1 d3d10 d3d9 dxgi d3d12 d3d12core" + elif [[ "${PW_VULKAN_USE}" == "1" ]] ; then + CP_WINE_FILES="ddraw d3d8 d3d12core" + elif [[ "${PW_VULKAN_USE}" == "2" ]] ; then + CP_WINE_FILES="ddraw d3d10_1 d3d10" + elif [[ "${PW_VULKAN_USE}" == "3" ]] ; then + CP_WINE_FILES="ddraw d3d8 d3d11 d3d10core d3d10_1 d3d10 dxgi d3d12 d3d12core" + elif [[ "${PW_VULKAN_USE}" == "4" ]] ; then + CP_WINE_FILES="ddraw d3d8 d3d11 d3d10core d3d10_1 d3d10 d3d9 dxgi d3d12 d3d12core" + elif [[ "${PW_VULKAN_USE}" == "5" ]] ; then + CP_WINE_FILES="ddraw d3d8 d3d12 d3d12core" + elif [[ "${PW_VULKAN_USE}" == "6" ]] ; then + CP_WINE_FILES="ddraw d3d8 d3d11 d3d10core d3d10_1 d3d10 d3d9 dxgi d3d12 d3d12core" + fi + try_remove_file "${WINEPREFIX}/drive_c/windows/syswow64/glide.dll" + try_remove_file "${WINEPREFIX}/drive_c/windows/syswow64/glide2x.dll" + try_remove_file "${WINEPREFIX}/drive_c/windows/syswow64/glide3x.dll" + try_remove_file "${WINEPREFIX}/drive_c/windows/syswow64/d3dimm.dll" + fi + # force use dxgi.dll from wine if [[ "${PW_USE_WINE_DXGI}" == "1" ]] ; then rm_from_var CP_DXVK_FILES "dxgi" @@ -2171,10 +2204,6 @@ start_portwine () { var_winedlloverride_update "${wine_dgv2_dll}=n" done try_copy_file "${PATH_TO_DGV2_FILES}/dgVoodoo.conf" "${WINEPREFIX}/drive_c/windows/syswow64/" - if [[ "${PW_VULKAN_USE}" == "6" ]] ; then - try_copy_file "${PATH_TO_DGV2_FILES}/x64/d3d9.dll" "${WINEPREFIX}/drive_c/windows/system32/" - try_copy_file "${PATH_TO_DGV2_FILES}/dgVoodoo.conf" "${WINEPREFIX}/drive_c/windows/system32/" - fi fi if [[ ! -d "${WINEPREFIX}/drive_c/vrclient/bin" ]] ; then @@ -2349,24 +2378,23 @@ start_portwine () { fi fi - # DGVOODOO2 settings + #DGVOODOO2 settings: if [[ "${PW_DGV2_DX12}" == "1" ]] ; then dgv2conf32="${WINEPREFIX}/drive_c/windows/syswow64/dgVoodoo.conf" - if [[ "${PW_VULKAN_USE}" == "6" ]] ; then - dgv2conf64="${WINEPREFIX}/drive_c/windows/system32/dgVoodoo.conf" - fi sed -i "s/OutputAPI = d3d11_fl11_0/OutputAPI = d3d12_fl12_0/" $dgv2conf32 $dgv2conf64 fi if [[ "${PW_DGV2_FASTMEMORY}" == "1" ]] ; then dgv2conf32="${WINEPREFIX}/drive_c/windows/syswow64/dgVoodoo.conf" - if [[ "${PW_VULKAN_USE}" == "6" ]] ; then - dgv2conf64="${WINEPREFIX}/drive_c/windows/system32/dgVoodoo.conf" - fi sed -i "s/FastVideoMemoryAccess = false/FastVideoMemoryAccess = true/" $dgv2conf32 $dgv2conf64 sed -i "s/VRAM = 256/VRAM = 1024/" $dgv2conf32 $dgv2conf64 fi + if [[ "${PW_DGV2_FULLSCREEN}" == "1" ]] ; then + dgv2conf32="${WINEPREFIX}/drive_c/windows/syswow64/dgVoodoo.conf" + sed -i "s/Resolution = unforced/Resolution = desktop/" $dgv2conf32 $dgv2conf64 + fi + pw_mangohud_check pw_vkbasalt_check } @@ -2807,9 +2835,13 @@ pw_gui_for_edit_db () { unset ADD_CHK_BOX_EDIT_DB - #DGVOODOO2 INFO + #DGVOODOO2 INFO: + PW_DGV2_FORCE_ENABLE_INFO=$(eval_gettext 'Forced use all dgVoodoo2 libs (Glide 2.11-3.1, DirectDraw 1-7, Direct3D 2-9) on all 3D API. For WineD3D OpenGL and Gallium Zink need use WineLG') + PW_DGV2_FORCE_DISABLE_INFO=$(eval_gettext 'Forced disable all dgVoodoo2 libs. Forced used WineD3D libs. DGV2_FORCE_ENABLE disable too') PW_DGV2_DX12_INFO=$(eval_gettext 'Use DirectX12 for dgVoodoo2. (Working only on newest and stable dxvk and vkd3d, D3D8 working on stable, some games may work better, some may work worse)') PW_DGV2_FASTMEMORY_INFO=$(eval_gettext 'Increase the amount of vram for dgVoodoo2 and enable fast memory access. (Enable if games have poor performance, using Unreal 2 as an example)') + PW_DGV2_FULLSCREEN_INFO=$(eval_gettext 'Render image based on monitor resolution. Can use if the game has a small interface size. Widescreen effect for 16:9') + 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)') @@ -4009,7 +4041,9 @@ 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_DINPUT_PROTOCOL PW_DGV2_DX12 PW_DGV2_FASTMEMORY" + PW_USE_RUNTIME PW_DINPUT_PROTOCOL PW_DGV2_FORCE_ENABLE PW_DGV2_FORCE_DISABLE PW_DGV2_DX12 PW_DGV2_FASTMEMORY PW_DGV2_FULLSCREEN + + " if check_wayland_session ; then rm_from_var PW_EDIT_DB_LIST "PW_USE_US_LAYOUT"