hack for genshin

This commit is contained in:
Mikhail Tergoev 2025-04-14 10:03:12 +03:00
parent a9666512f2
commit c15c43eb0a
2 changed files with 20 additions and 4 deletions

@ -4318,9 +4318,6 @@ pw_run () {
if file "$portwine_exe" | grep -q "x86-64" ; then if file "$portwine_exe" | grep -q "x86-64" ; then
print_info "file: $portwine_exe is x86-64, force set WINE_LARGE_ADDRESS_AWARE to 0" print_info "file: $portwine_exe is x86-64, force set WINE_LARGE_ADDRESS_AWARE to 0"
export WINE_LARGE_ADDRESS_AWARE="0" export WINE_LARGE_ADDRESS_AWARE="0"
if [[ -f "${WINELOADER}64" ]]
then export WINELOADER="${WINELOADER}64"
fi
else else
print_info "file: $portwine_exe not x86-64, force set WINE_LARGE_ADDRESS_AWARE to 1" print_info "file: $portwine_exe not x86-64, force set WINE_LARGE_ADDRESS_AWARE to 1"
export WINE_LARGE_ADDRESS_AWARE="1" export WINE_LARGE_ADDRESS_AWARE="1"
@ -6412,7 +6409,7 @@ pw_auto_create_shortcut () {
if [[ "${PW_CHECK_AUTOINSTALL}" == "1" ]] \ if [[ "${PW_CHECK_AUTOINSTALL}" == "1" ]] \
|| [[ "${PW_NO_AUTO_CREATE_SHORTCUT}" == "1" ]] \ || [[ "${PW_NO_AUTO_CREATE_SHORTCUT}" == "1" ]] \
|| [[ -z "${portwine_exe}" ]] \ || [[ -z "${portwine_exe}" ]] \
|| echo "${portwine_exe}" | grep -i "gc_api.exe\|vkplay\|pulseonline" &>/dev/null || echo "${portwine_exe}" | grep -i "gc_api.exe\|vkplay\|pulseonline\|hoyoplay_launcher_pp" &>/dev/null
then then
print_warning "Skipping auto create shortcut" print_warning "Skipping auto create shortcut"
return 0 return 0

@ -7,3 +7,22 @@
export PW_WINDOWS_VER="10" export PW_WINDOWS_VER="10"
export PW_VULKAN_USE="2" export PW_VULKAN_USE="2"
export PW_PREFIX_NAME="HO_YO_PLAY" export PW_PREFIX_NAME="HO_YO_PLAY"
export PW_WINE_USE="WINE_LG"
add_in_start_portwine() {
genshin_hack() {
if command -v nmcli &>/dev/null ; then
while true ; do
if pgrep -i genshinimp ; then
nmcli networking off
sleep 10
nmcli networking on
break
else
sleep 0.5
fi
done
fi
}
genshin_hack &
}