This commit is contained in:
Dragoon Dorise 2024-04-13 23:10:10 +02:00
parent 0439bed9d0
commit ea579bb60c
2 changed files with 4 additions and 7 deletions

View file

@ -12,14 +12,13 @@ netplaySetIP(){
segment=$(echo $localIP | awk -F '.' '{print $1"."$2"."$3}')
subnet="$segment".
port=55435
timeout_seconds=1
netplaySetHost
#netplaySetHost
for i in {2..255}; do
{
ip="$subnet$i"
if (echo > /dev/tcp/$ip/$port) >/dev/null 2>&1; then
netplaySetClient
setSetting netplayIP $ip
setSetting netplayHost "false"
setSetting netplayIP "$ip"
exit
fi
} &

View file

@ -941,15 +941,13 @@ function emulatorInit(){
#Looks for devices listening, no listening device? you want to host
netplaySetIP
source $HOME/.config/EmuDeck/backend/functions/all.sh
if [ "$netplayHost" == "true" ]; then
setSetting netplayCMD "-H"
elif [ "$netplayHost" == "false" ]; then
setSetting netplayCMD "-C $netplayIP"
setSetting netplayCMD "'-C $netplayIP'"
else
setSetting netplayCMD ""
fi
fi
cloud_sync_downloadEmu "$emuName" && cloud_sync_startService