summarylogtreecommitdiffstats
path: root/save-sshot-in-homedir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'save-sshot-in-homedir.patch')
-rw-r--r--save-sshot-in-homedir.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/save-sshot-in-homedir.patch b/save-sshot-in-homedir.patch
new file mode 100644
index 000000000000..3a3ba4f1c0ef
--- /dev/null
+++ b/save-sshot-in-homedir.patch
@@ -0,0 +1,28 @@
+From: Goneri Le Bouder <goneri@rulezlan.org>
+Date: Fri, 10 May 2013 18:02:13 +0200
+Subject: save-sshot-in-homedir
+
+---
+ game.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/game.py b/game.py
+index 80dd12c..bcd30de 100644
+--- a/game.py
++++ b/game.py
+@@ -245,10 +245,13 @@ class Game:
+
+ def take_screenshot(self):
+ i = 1
+- filename = "sshot.tga"
++ basedir = os.environ['HOME']
++ if not basedir:
++ basedir = '/home'
++ filename = basedir + "/funnyboat-sshot.tga"
+ while os.path.exists(filename):
+ i += 1
+- filename = "sshot" + str(i) + ".tga"
++ filename = filename + "/funnyboat-sshot" + str(i) + ".tga"
+
+ pygame.image.save(self.screen, filename)
+ print "Screenshot saved as " + filename