Skip to content

Commit

Permalink
Fix Easy Netplay with other themes than Silky
Browse files Browse the repository at this point in the history
It seems that with some themes infoPanel --persistent is not dismissed.
Probably due to the fact that infoPanel is launched in background : a question of synchronization with the flag (the previous infoPanel erase the flag of the next infoPanel ?)

These modifications with sync commands and a pkill should definitively solve the problem.
  • Loading branch information
schmurtzm committed Oct 26, 2023
1 parent 7d6fce9 commit 92b8752
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,15 @@ build_infoPanel_and_log() {
local message="$2"

log "Info Panel: \n\tStage: $title\n\tMessage: $message"

if is_running infoPanel; then
killall -9 infoPanel
fi
infoPanel --title "$title" --message "$message" --persistent &
sync
touch /tmp/dismiss_info_panel
sync
sleep 0.3
sync
}

confirm_join_panel() {
Expand Down Expand Up @@ -503,6 +507,7 @@ cleanup() {
if is_running infoPanel; then
killall -9 infoPanel
fi
rm /tmp/dismiss_info_panel

sync

Expand All @@ -512,6 +517,7 @@ cleanup() {
rm "/mnt/SDCARD/RetroArch/retroarch.cookie.client"

log "Cleanup done"
sync
exit
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ cleanup() {
rm "/tmp/wpa_supplicant.conf_bk"
rm "/mnt/SDCARD/RetroArch/retroarch.cookie.client"
rm "/mnt/SDCARD/RetroArch/retroarch.cookie"
rm "/tmp/dismiss_info_panel"
sync

log "Cleanup done"
exit
Expand Down Expand Up @@ -663,15 +665,19 @@ flag_enabled() {
}

build_infoPanel_and_log() {
local title="$1"
local message="$2"

log "Info Panel: \n\tStage: $title\n\tMessage: $message"

infoPanel --title "$title" --message "$message" --persistent &
touch /tmp/dismiss_info_panel
sync
sleep 0.3
local title="$1"
local message="$2"

log "Info Panel: \n\tStage: $title\n\tMessage: $message"
if is_running infoPanel; then
killall -9 infoPanel
fi
infoPanel --title "$title" --message "$message" --persistent &
sync
touch /tmp/dismiss_info_panel
sync
sleep 0.3
sync
}

confirm_join_panel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ cleanup() {
# Remove some files we prepared and received
log "Removing stale files"
rm "/mnt/SDCARD/RetroArch/retroarch.cookie"

rm "/tmp/dismiss_info_panel"
sync
log "Cleanup done"
exit

Expand All @@ -147,11 +148,15 @@ build_infoPanel_and_log() {
local message="$2"

log "Info Panel: \n\tStage: $title\n\tMessage: $message"

if is_running infoPanel; then
killall -9 infoPanel
fi
infoPanel --title "$title" --message "$message" --persistent &
sync
touch /tmp/dismiss_info_panel
sync
sleep 0.3
sync
}

restore_ftp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ cleanup() {
rm "/tmp/MISSING.srm"
rm "/tmp/stop_now"
disable_flag hotspotState

rm "/tmp/dismiss_info_panel"
sync
log "Cleanup done"
exit
}
Expand Down Expand Up @@ -885,11 +886,15 @@ build_infoPanel_and_log() {
local message="$2"

log "Info Panel: \n\tStage: $title\n\tMessage: $message"

if is_running infoPanel; then
killall -9 infoPanel
fi
infoPanel --title "$title" --message "$message" --persistent &
sync
touch /tmp/dismiss_info_panel
sync
sleep 0.5
sync
}

restore_ftp() {
Expand Down
6 changes: 5 additions & 1 deletion static/build/.tmp_update/script/netplay/standard-netplay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,15 @@ build_infoPanel_and_log() {
local message="$2"

log "Info Panel: \n\tStage: $title\n\tMessage: $message"

if is_running infoPanel; then
killall -9 infoPanel
fi
infoPanel --title "$title" --message "$message" --persistent &
sync
touch /tmp/dismiss_info_panel
sync
sleep 0.5
sync
}

is_running() {
Expand Down

0 comments on commit 92b8752

Please sign in to comment.