Permalink
Browse files

using HOMEDRIVE and HOMEPATH instead of HOME to save highscore on win…

…dows
  • Loading branch information...
1 parent 7a9f871 commit 4d38cc93be7b469c8dadcd0281c155c0334ea07b @FROGGS committed Jun 29, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 bin/bubble-breaker.pl
View
@@ -43,7 +43,9 @@
depth => 32, title => "BubbleBreaker", color => 0x000000FF,
flags => SDL_SWSURFACE|SDL_DOUBLEBUF|SDL_NOFRAME,
init => 0, eoq => 1, delay => 20 );
-my $HOME = "$ENV{HOME}/.bubble-breaker";
+my $HOME = $^O eq 'MSWin32'
+ ? catpath($ENV{HOMEDRIVE}, catdir($ENV{HOMEPATH}, '.bubble-breaker'))
+ : "$ENV{HOME}/.bubble-breaker";
mkdir($HOME) unless -d $HOME;
my ($v, $p, $f) = splitpath(__FILE__);
my $SHARE = -e catpath($v, catdir($p, '..', 'share'), 'background.png')

0 comments on commit 4d38cc9

Please sign in to comment.