This commit is contained in:
Dragoon Dorise 2024-04-13 23:18:36 +02:00
parent 77a0d5c810
commit c9eefbfb2d
2 changed files with 3 additions and 4 deletions

View file

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

View file

@ -940,6 +940,8 @@ function emulatorInit(){
if [ "$emuName" = 'retroarch' ]; then
if [ "$netPlay" == "true" ]; then
#Looks for devices listening, no listening device? you want to host
netplaySetHost
sleep 2
netplaySetIP
if [ "$netplayHost" == "true" ]; then
setSetting netplayCMD "-H"
@ -949,7 +951,7 @@ function emulatorInit(){
setSetting netplayCMD ""
fi
else
setSetting netplayCMD ""
setSetting netplayCMD "' '"
fi
fi