From cabe1c67c53fbdce1f2eea9f4fef8e9282547b70 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Tue, 15 Jun 2010 11:20:41 +0000
Subject: [PATCH] install zip game while browsing using games_sw
---
src/sdl-instead/game.c | 2 +-
src/sdl-instead/game.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/sdl-instead/game.c b/src/sdl-instead/game.c
index 3db8b3d..8885557 100644
--- a/src/sdl-instead/game.c
+++ b/src/sdl-instead/game.c
@@ -2417,7 +2417,7 @@ int game_from_disk(void)
b = basename(b);
/* fprintf(stderr,"%s:%s\n", d, b); */
#ifdef _USE_UNPACK
- p = game_local_games_path(1);
+ p = games_sw ? games_sw:game_local_games_path(1);
fprintf(stderr,"Trying to install: %s\n", g);
if (!unpack(g, p)) {
if (!zip_game_dirname[0])
diff --git a/src/sdl-instead/game.h b/src/sdl-instead/game.h
index 38cdeec..c7ef5e2 100644
--- a/src/sdl-instead/game.h
+++ b/src/sdl-instead/game.h
@@ -17,6 +17,7 @@ extern int fullscreen_sw;
extern int window_sw;
extern int nopause_sw;
extern int game_own_theme; /* current game has own theme */
+extern char *games_sw;
extern char *err_msg; /* last error message */
extern char game_cwd[PATH_MAX]; /* current game cwd */
extern char *curgame_dir;