Rev 1 | Rev 124 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1 | Rev 119 | ||
|---|---|---|---|
| Line 3... | Line 3... | ||
| 3 | #include "../common.h" |
3 | #include "../common.h" |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | // global variables used in this module only |
6 | // global variables used in this module only |
| 7 | static wchar_t ofn_customfilter[256] = L""; |
7 | static wchar_t ofn_customfilter[256] = L""; |
| - | 8 | static bool quit_after_save = false; |
|
| 8 | 9 | ||
| 9 | 10 | ||
| 10 | // local prototypes |
11 | // local prototypes |
| 11 | static void StartThread_ThisDialog (void *thread_parms); |
12 | static void StartThread_ThisDialog (void *thread_parms); |
| 12 | 13 | ||
| 13 | 14 | ||
| 14 | void DialogBox_Save ( |
15 | void DialogBox_Save (bool want_quit_after_save) |
| 15 | { |
16 | { |
| 16 | // helper function to fire up the modeless Save dialog box |
17 | // helper function to fire up the modeless Save dialog box |
| 17 | 18 | ||
| - | 19 | quit_after_save = want_quit_after_save; |
|
| 18 | _beginthread (StartThread_ThisDialog, 0, NULL); // fire up a new one |
20 | _beginthread (StartThread_ThisDialog, 0, NULL); // fire up a new one |
| 19 | 21 | ||
| 20 | return; // return as soon as the thread is fired up |
22 | return; // return as soon as the thread is fired up |
| 21 | } |
23 | } |
| 22 | 24 | ||
| Line 55... | Line 57... | ||
| 55 | wcscpy_s (messagebox.text, WCHAR_SIZEOF (messagebox.text), LOCALIZE (L"Error_SaveFailed")); |
57 | wcscpy_s (messagebox.text, WCHAR_SIZEOF (messagebox.text), LOCALIZE (L"Error_SaveFailed")); |
| 56 | messagebox.flags = MB_ICONWARNING | MB_OK; |
58 | messagebox.flags = MB_ICONWARNING | MB_OK; |
| 57 | DialogBox_Message (&messagebox); // on error, display a modeless error message box |
59 | DialogBox_Message (&messagebox); // on error, display a modeless error message box |
| 58 | } |
60 | } |
| 59 | } |
61 | } |
| - | 62 | ||
| - | 63 | // did we want to quit after save ? |
|
| - | 64 | if (quit_after_save) |
|
| - | 65 | is_dialogbox_quit_validated = true; // if so, act as if the quit dialog box was validated |
|
| 60 | 66 | ||
| 61 | return; // finished, game has been saved |
67 | return; // finished, game has been saved |
| 62 | } |
68 | } |
| 63 | 69 | ||
| 64 | 70 | ||