Commit 83c468d0 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'fixed-new-desktop' of github.com:Htylol/PortWINE into Htylol-fixed-new-desktop

parents 2122c1e1 682baa2f
...@@ -806,8 +806,11 @@ search_desktop_file () { ...@@ -806,8 +806,11 @@ search_desktop_file () {
echo "#NEW_DESKTOP" >> "$desktop_file" echo "#NEW_DESKTOP" >> "$desktop_file"
TIME_CURRENT="0" TIME_CURRENT="0"
# Для битых #Time= # Для битых #Time=
elif [[ ! $TIME_CURRENT == "" ]] && [[ ! $TIME_CURRENT =~ [0-9]+ ]] ; then else
TIME_CURRENT="0" if [[ ! $TIME_CURRENT =~ [0-9]+ ]] \
|| (( $TIME_CURRENT >= 999999999 )) ; then
TIME_CURRENT="0"
fi
fi fi
TIME_CURRENT_ARRAY+=($TIME_CURRENT) TIME_CURRENT_ARRAY+=($TIME_CURRENT)
unset TIME_CURRENT unset TIME_CURRENT
...@@ -1455,9 +1458,11 @@ stop_portwine () { ...@@ -1455,9 +1458,11 @@ stop_portwine () {
pw_auto_create_shortcut pw_auto_create_shortcut
add_in_stop_portwine add_in_stop_portwine
debug_timer --end -s "PW_TIME_IN_GAME" if [[ $PW_LOG != 1 ]] ; then
PW_TIME_IN_GAME=$(( PW_TIME_IN_GAME / 1000 )) # в секундах debug_timer --end -s "PW_TIME_IN_GAME"
search_desktop_file PW_TIME_IN_GAME=$(( PW_TIME_IN_GAME / 1000 )) # в секундах
search_desktop_file
fi
case "$1" in case "$1" in
--restart) --restart)
...@@ -3688,7 +3693,7 @@ portwine_launch () { ...@@ -3688,7 +3693,7 @@ portwine_launch () {
PW_VD_TMP=(explorer "/desktop=PortProton,${PW_SCREEN_RESOLUTION}") PW_VD_TMP=(explorer "/desktop=PortProton,${PW_SCREEN_RESOLUTION}")
fi fi
debug_timer --start -s "PW_TIME_IN_GAME" [[ $PW_LOG != 1 ]] && debug_timer --start -s "PW_TIME_IN_GAME"
case "$portwine_exe" in case "$portwine_exe" in
*.[Ee][Xx][Ee]) *.[Ee][Xx][Ee])
pw_run ${PW_VD_TMP[@]} ${WINE_WIN_START} "$portwine_exe" pw_run ${PW_VD_TMP[@]} ${WINE_WIN_START} "$portwine_exe"
......
...@@ -644,7 +644,8 @@ else ...@@ -644,7 +644,8 @@ else
PW_AMOUNT_OLD_DESKTOP+=($AMOUNT_GENERATE_BUTTONS) PW_AMOUNT_OLD_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
fi fi
# Для фикса битых #Time= # Для фикса битых #Time=
if [[ ! ${PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]} =~ [0-9]+ ]] ; then if [[ ! ${PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]} =~ [0-9]+ ]] \
|| (( ${PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]} >= 999999999 )) ; then
portwine_exe=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//\"/} portwine_exe=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//\"/}
search_desktop_file search_desktop_file
unset portwine_exe unset portwine_exe
...@@ -660,7 +661,8 @@ else ...@@ -660,7 +661,8 @@ else
if [[ $SORT_WITH_TIME == enabled ]] ; then if [[ $SORT_WITH_TIME == enabled ]] ; then
for i in "${!PW_GAME_TIME[@]}" ; do for i in "${!PW_GAME_TIME[@]}" ; do
for j in "${!PW_GAME_TIME[@]}" ; do for j in "${!PW_GAME_TIME[@]}" ; do
if (( ${PW_GAME_TIME[$i]} > ${PW_GAME_TIME[$j]} )) ; then if (( ${PW_GAME_TIME[$i]} > ${PW_GAME_TIME[$j]} )) \
&& [[ ! ${PW_AMOUNT_NEW_DESKTOP[*]} =~ $j ]] ; then
tmp_0=${PW_GAME_TIME[$i]} tmp_0=${PW_GAME_TIME[$i]}
tmp_1=${PW_ALL_DF[$i]} tmp_1=${PW_ALL_DF[$i]}
tmp_2=${PW_NAME_D_ICON[$i]} tmp_2=${PW_NAME_D_ICON[$i]}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment