Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Tau5/Co-op-on-Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Tau5 committed Aug 23, 2024
2 parents e7a9329 + 4639070 commit 5df33f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions create-new-profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if [ "$MULTIWINDOW" = "Separate Windows" ]; then
declare -a MW_WIDTHS
declare -a MW_HEIGHTS
for i in $(seq 0 $((NUM_WINDOWS - 1))); do
RESOLUTION=$($DIALOG --title="Resolution" --entry --text="Enter screen resolution for player 1 ( for example: 1280x720 ) " --entry-text=$DEFAULT_RES)
MW_WIDTHS+=$(printf $RESOLUTION | awk -F "x" '{print $1}')
MW_HEIGHTS+=$(printf $RESOLUTION | awk -F "x" '{print $2}')
RESOLUTION=$($DIALOG --title="Resolution" --entry --text="Enter screen resolution for player $(($i + 1)) ( for example: 1280x720 ) " --entry-text=$DEFAULT_RES)
MW_WIDTHS[$i]=$(printf $RESOLUTION | awk -F "x" '{print $1}')
MW_HEIGHTS[$i]=$(printf $RESOLUTION | awk -F "x" '{print $2}')
done
elif [ "$MULTIWINDOW" = "Splitscreen Window" ]; then
RESOLUTION=$($DIALOG --title="Resolution" --entry --text="Enter screen resolution ( for example: 1280x720 ) " --entry-text=$DEFAULT_RES)
Expand All @@ -36,8 +36,8 @@ if [ "$MULTIWINDOW" = "Separate Windows" ]; then
echo "export MULTIWINDOW=1" >> "$DIR_CO_OP/profiles/$name.sh"
echo "export NUM_WINDOWS=$NUM_WINDOWS" >> "$DIR_CO_OP/profiles/$name.sh"
for i in $(seq 0 $((NUM_WINDOWS - 1))); do
echo "export WIDTH$(($i + 1))=${MW_WIDTHS[$i]}" >> "$DIR_CO_OP/profiles/$name.sh"
echo "export HEIGHT$(($i + 1))=${MW_HEIGHTS[$i]}" >> "$DIR_CO_OP/profiles/$name.sh"
echo "export WIDTH$(($i + 1))=${MW_WIDTHS[$i]}" >> "$DIR_CO_OP/profiles/$name.sh"
echo "export HEIGHT$(($i + 1))=${MW_HEIGHTS[$i]}" >> "$DIR_CO_OP/profiles/$name.sh"
done
elif [ "$MULTIWINDOW" = "Splitscreen Window" ]; then
echo "export WIDTH=$WIDTH" >> "$DIR_CO_OP/profiles/$name.sh"
Expand Down

0 comments on commit 5df33f7

Please sign in to comment.