-# screenshot
-touch .touch
-find $HOME/.config/PCSX2/snaps/ -type f | xargs rm .touch
-pcsx2 "$file"
-capture=$(find $HOME/.config/PCSX2/snaps/ -type f | sort)
-if [ "$capture" ]; then
- cp "$capture" tmp.png
- mogrify -scale 1000x560 tmp.png
- mogrify -background transparent -gravity center -extent 1000x560 tmp.png
- mv tmp.png $serial/PIC0.PNG
+# get screenshot
+title "get screenshot"
+if [ $CACHE/$serial-PIC0.PNG ]; then
+ cp $CACHE/$serial-PIC0.PNG $serial/PIC0.PNG
+else
+ touch .touch
+ find $HOME/.config/PCSX2/snaps/ -type f | xargs rm .touch
+ pcsx2 "$file"
+ capture=$(find $HOME/.config/PCSX2/snaps/ -type f | sort)
+ if [ "$capture" ]; then
+ cp "$capture" tmp.png
+ mogrify -scale 1000x560 tmp.png
+ mogrify -background transparent -gravity center -extent 1000x560 tmp.png
+ mv tmp.png $serial/PIC0.PNG
+ cp $serial/PIC0.PNG $CACHE/$serial-PIC0.PNG
+ else
+ warn "can't find screenshot"
+ fi