From 55423efb0687d937256d17ad267fce67ed9bf5cf Mon Sep 17 00:00:00 2001 From: Darkvater Date: Mon, 30 May 2005 22:16:05 +0000 Subject: (svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big. - Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types. --- win32.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'win32.c') diff --git a/win32.c b/win32.c index 6f2a746b3..a2ef16322 100644 --- a/win32.c +++ b/win32.c @@ -181,7 +181,7 @@ static void ClientSizeChanged(int w, int h) } } -void DoExitSave(void); +extern void DoExitSave(void); static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { @@ -1194,8 +1194,11 @@ static const char _save_succeeded[] = "Be aware that critical parts of the internal game state may have become " "corrupted. The saved game is not guaranteed to work."; -bool EmergencySave(); - +static bool EmergencySave(void) +{ + SaveOrLoad("crash.sav", SL_SAVE); + return true; +} typedef struct { HINTERNET (WINAPI *InternetOpenA)(LPCSTR,DWORD, LPCSTR, LPCSTR, DWORD); -- cgit v1.2.3-70-g09d2