dev/cpp/affinity/starcraft2

15 lines
271 B
Bash
Executable File

#!/bin/bash
cd ~/.wine/drive_c/Games/StarCraft2
(wine StarCraft\ II &>/dev/null)&
for i in `seq 20`; do
sleep 60
sc2_pid=`pgrep "SC2.exe"`
if [ "$sc2_pid" != "" ]; then
echo "Setting SC2 ($sc2_pid) affinity to CPU 1" 1>&2
affinity -p "$sc2_pid" -c 3
fi
done