#!/usr/bin/env bash
#Author: PortWINE
#wgc.exe
#wgc_api.exe
#Rating=5
export PW_COMMENT_DB="Wargaming Game Center"
################################################
export PW_WINE_USE=PROTON_GE
export PW_VULKAN_USE=1                       #dxvk, vkd3d or 0 for OpenGL
export LAUNCH_PARAMETERS="--disable-gpu"            # Additional launch options
#export PW_USE_TERMINAL=1
export PW_WINDOWS_VER=10                        # Set windows version 10, 7 or XP
#export PW_USE_NVAPI_AND_DLSS=0
export WINEDLLOVERRIDES="ucrtbase,xaudio2_7,xaudio2_8=n,b"
export PW_DLL_INSTALL="lucida vcrun2019"     # Install DDL in port prefix (used winetricks)
##export PW_GUI_DISABLED_CS=1
##export PW_WINEDBG_DISABLE=1                     # Disabled WINEDBG

add_in_start_portwine () {
    if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml" ]] ; then
        sed -i 's%<igbHardwareAccelerationEnabled> true </igbHardwareAccelerationEnabled>%<igbHardwareAccelerationEnabled> false </igbHardwareAccelerationEnabled>%' "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml"
    fi
}
