mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-06-02 19:47:51 -04:00
netplay
This commit is contained in:
parent
0439bed9d0
commit
ea579bb60c
|
@ -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
|
||||
} &
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue