#!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2343
#SCRIPTS_STABLE_VERSION=2342
########################################################################
# export PROTON_USE_XALIA="1"
export LANGUAGES_LIST="ru es"
export PW_VKBASALT="0"
export PW_MANGOHUD="0"
export PW_DGVOODOO2="0"
export PW_GAMESCOPE="0"
export PW_USE_RUNTIME="1"
export PW_RT_MOUNT_RO=("")
export PW_RT_MOUNT_RW=("/media" "/mnt" "/run/media/${USER}" "${PORT_WINE_PATH}")
#export PW_SANDBOX_HOME_PATH="${PORT_WINE_PATH}"
export PW_NO_ESYNC="1"
export PW_USE_GAMEMODE="1"
export PW_FORCE_USE_VSYNC="2"
export PW_USE_TERMINAL="0"
export PW_WINDOWS_VER="10"
export WINEARCH="win64"
export PW_LIBS_VER="_v49"
export PW_USE_GSTREAMER="1"
export PW_USE_D3D_EXTRAS="1"
export PW_PREFIX_NAME="DEFAULT"
export WINE_WIN_START="start /wait /high /unix"
export WINE_ALLOW_XIM="0"
export PW_USE_SHADER_CACHE="1"
export PW_WINE_CPU_TOPOLOGY="disabled"
export STAGING_SHARED_MEMORY="1"
export PW_MESA_GL_VERSION_OVERRIDE="disabled"
export PW_VKD3D_FEATURE_LEVEL="disabled"
export PW_FORCE_LARGE_ADDRESS_AWARE="1"
export PW_USE_EAC_AND_BE="1"
export PW_USE_US_LAYOUT="0"
export PW_GPU_USE="disabled"
export PW_LOCALE_SELECT="disabled"
export PW_DINPUT_PROTOCOL="0"
###GTK_CONFIG###
# export GTK_DATA_PREFIX=
# export GTK_THEME="Adwaita:dark"
###DEFAULT_WINE###
export PW_WINE_USE="PROTON_LG"
export PW_PLUGINS_VER="_v17"
export PW_FAKE_DLSS_VER="230506"
export PW_FAKE_DLSS_3_VER="090"
export PW_GALLIUM_NINE_VER="0.9"
###WINE_AND_PROTON_LG###
export PW_PROTON_LG_VER="PROTON_LG_9-12"
export PW_WINE_LG_VER="WINE_LG_9-12-2"
export PW_WINE_FULLSCREEN_FSR="1"
export WINE_FULLSCREEN_FSR_MODE="ultra"
###DXVK_AND_VKD3D###
export PW_VULKAN_USE="2"
export VKD3D_LIMIT_TESS_FACTORS="64"
export DXVK_LEGACY_VER="1.6.1"
export DXVK_STABLE_VER="1.10.3-28"
export DXVK_GIT_VER="2.4-37"
export VKD3D_STABLE_VER="1.1-2602"
export VKD3D_GIT_VER="1.1-4167"
###VKBASALT###
export PW_VKBASALT_EFFECTS="Curves:cas"
export PW_VKBASALT_FFX_CAS="0.66"
###MANGOHUD###
export DEFAULT_MANGOHUD_CONFIG="arch,cpu_mhz,cpu_temp,engine_version,gamemode,gpu_core_clock,gpu_mem_clock,gpu_name,gpu_temp,ram,resolution,vkbasalt,vram,vulkan_driver,wine"
###DGVOODOO2###
export DGV2_VER="2.79.3"
export PW_DGV2_ANTIALIASING="disabled"
export PW_DGV2_FILTERING="disabled"
export PW_DGV2_DISABLE_D3D="0"
export PW_DGV2_16BIT_MODE="0"
export PW_DGV2_USE_DX12="0"
export PW_DGV2_FASTMEMORY="0"
export PW_DGV2_ENABLE_CRT="0"
export PW_DGV2_DISABLE_MIPMAPPING="0"
export PW_DGV2_GLIDE_GAMMA_RAMP="1"
export PW_DGV2_GLIDE_NAPALM="0"
export PW_DGV2_FREE_MOUSE="0"
export PW_DGV2_VRAM="256"
export PW_DGV2_RESOLUTION="disabled"
export PW_DGV2_DISPLAY_ROI="disabled"
export PW_DGV2_FPS_LIMIT="disabled"
export PW_DGV2_BLIT_STRETCH="0"
export PW_DGV2_PHONG_SHADING="0"
export PW_DGV2_BIT_DEPTH="disabled"
export PW_DGV2_VIDEOCARD="dgVoodoo2 Virtual 3D"
export PW_DGV2_BRIGHTNESS="100"
export PW_DGV2_COLOR="100"
export PW_DGV2_CONTRAST="100"
export PW_DGV2_ONBOARD_RAM="0"
export PW_DGV2_16_BIT_DEPTH_BUFFER="0"
export PW_DGV2_CURSOR_SCALE="0"
export PW_DGV2_INACTIVE_APP_STATE="0"
export PW_DGV2_RESAMPLING="disabled"
export PW_DGV2_FORCE_VSYNC="0"
export PW_DGV2_3DFX_SPLASH_SCREEN="0"
export PW_DGV2_3DFX_WATERMARK="0"
export PW_DGV2_EMULATING_PCI_ACCESS="0"
export PW_DGV2_DGVOODOO_WATERMARK="0"
export PW_DGV2_FILTER_POINT_SAMPLED="0"
###GAMESCOPE###
export PW_GS_INTERNAL_RESOLUTION="1.0"
export PW_GS_SHOW_RESOLUTION="disabled"
export PW_GS_FRAME_LIMIT="disabled"
export PW_GS_FILTER_MODE="disabled"
export PW_GS_SCALER_MODE="disabled"
export PW_GS_MOUSE_SENSITIVITY="0.0"
export PW_GS_UPSCALE_SHARPNESS="10"
export PW_GS_MAX_SCALE_FACTOR="0.0"
export PW_GS_SDR_CONTENT_NITS="400"
export PW_GS_ITM_SDR_NITS="0"
export PW_GS_ITM_TARGET_NITS="0"
export PW_GS_FULLSCREEN="0"
export PW_GS_BORDERLESS_WINDOW="0"
export PW_GS_FORCE_FULLSCREEN="0"
export PW_GS_FORCE_GRAB_CURSOR="0"
export PW_GS_FORCE_GRAB_KEYBOARD="0"
export PW_GS_HDR_ENABLE="0"
export PW_GS_ENABLE_GAMESCOPE_WSI="0"
export PW_GS_SDR_GAMMUT_WIDENESS="0"
export PW_GS_HDR_ITM_ENABLE="0"
export PW_GS_FORCE_COMPOSITION="0"
export PW_GS_HDR_FORCE_SUPPORT="0"
export PW_GS_HDR_FORCE_OUTPUT="0"
export PW_GS_HDR_FORCE_HEATMAP="0"
export PW_GS_EXPOSE_WAYLAND="0"
export PW_GS_REALTIME_SCHEDULING="0"
export PW_GS_FIX_AMD_AND_INTEL="0"
export PW_GS_BACKEND_SDL="0"
export PW_GS_SDL_VIDEODRIVER_X11="0"
export PW_GS_MANGOAPP="0"
export PW_GS_MESA_VK_WSI_PRESENT_MODE="disabled"
###PREFIX_VERSION###
export DOTPFX_VER="48v7"
export DEFPFX_VER="v1"
export PROGPFX_VER="v1"
export PW_MUST_WINEDLLOVERRIDES="steam_api,steam_api64,steamclient,steamclient64=n;dotnetfx35.exe,dotnetfx35setup.exe=b;winemenubuilder.exe="
#################################################################
# Get our APi on https://www.steamgriddb.com/profile/preferences/api/
export SGDBAPIKEY="4a022f8848eaaa8e9c30067cd6676129"
#################################################################
export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk.conf"
#################################################################
pw_list_install_dll_in_prefix ()
{
    STANDART_DLL="d3dx9 d3dcompiler_43 d3dcompiler_47 physx mfc42 vcrun2022 sandbox corefonts tahoma lucida calibri faudio"
    case $PW_PREFIX_NAME in
        DEFAULT)    export PW_MUST_HAVE_DLL="$STANDART_DLL" ;;
        DOTNET)     export PW_MUST_HAVE_DLL="dotnet48" ;;
        PROGRAMS)   export PW_MUST_HAVE_DLL="riched20 msxml3 msxml4 msxml6" ;;
        *)          export PW_MUST_HAVE_DLL="sandbox" ;;
    esac
}
########################################################################
add_in_start_portwine () { echo "" ;}
add_in_stop_portwine () { echo "" ;}
pw_other_fixes () { echo "" ;}
export -f add_in_stop_portwine add_in_stop_portwine pw_other_fixes
########################################################################
