summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2007-02-27 15:17:06 +0000
committerDarkvater <Darkvater@openttd.org>2007-02-27 15:17:06 +0000
commita0a259d32bd7f22c3d077b1ca16c43d02fb18a6b (patch)
treef8e6326410e1dc9d07a1b8e68d3954638b915b89
parentd2a36e4c2de376e4ae640fe0770eb511d4bcd9e3 (diff)
downloadopenttd-a0a259d32bd7f22c3d077b1ca16c43d02fb18a6b.tar.xz
(svn r8914) -Regression (UTF8): Win9x is very picky about trailing slashes in paths, so C:\\* will not work (but C:\Windows\\* does; go figure). Thanks glx for pointing it out and for the initial fix.
-rw-r--r--src/newgrf_gui.cpp3
-rw-r--r--src/saveload.cpp7
2 files changed, 4 insertions, 6 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 6d5a78b89..54cbdd536 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -485,6 +485,9 @@ static void NewGRFWndProc(Window *w, WindowEvent *e)
break;
case WE_DESTROY:
+ if (!WP(w, newgrf_d).execute) {
+ CopyGRFConfigList(WP(w, newgrf_d).orig_list, *WP(w, newgrf_d).list);
+ }
/* Remove the temporary copy of grf-list used in window */
ClearGRFConfigList(WP(w, newgrf_d).list);
break;
diff --git a/src/saveload.cpp b/src/saveload.cpp
index 4922419e6..8e5348bc1 100644
--- a/src/saveload.cpp
+++ b/src/saveload.cpp
@@ -1593,13 +1593,8 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode)
/* No loader found, treat as version 0 and use LZO format */
if (fmt == endof(_saveload_formats)) {
DEBUG(sl, 0, "Unknown savegame type, trying to load it as the buggy format");
-#if defined(WINCE)
- /* Of course some system had not to support rewind ;) */
- fseek(_sl.fh, 0L, SEEK_SET);
- clearerr(_sl.fh);
-#else
+
rewind(_sl.fh);
-#endif
_sl_version = 0;
_sl_minor_version = 0;
fmt = _saveload_formats + 1; // LZO