diff options
Diffstat (limited to 'newgrf_gui.c')
-rw-r--r-- | newgrf_gui.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/newgrf_gui.c b/newgrf_gui.c index 9babf017e..ad9aa5916 100644 --- a/newgrf_gui.c +++ b/newgrf_gui.c @@ -278,10 +278,9 @@ static void SetupNewGRFWindow(Window *w) /** Callback function for the newgrf 'apply changes' confirmation window * @param yes_clicked boolean value, true when yes was clicked, false otherwise */ -static void NewGRFConfirmationCallback(bool yes_clicked) +static void NewGRFConfirmationCallback(Window *w, bool confirmed) { - if (yes_clicked) { - Window *w = FindWindowById(WC_GAME_OPTIONS, 0); + if (confirmed) { newgrf_d *nd = &WP(w, newgrf_d); CopyGRFConfigList(nd->orig_list, *nd->list); @@ -424,9 +423,8 @@ static void NewGRFWndProc(Window *w, WindowEvent *e) ShowQuery( STR_POPUP_CAUTION_CAPTION, STR_NEWGRF_CONFIRMATION_TEXT, - NewGRFConfirmationCallback, - w->window_class, - w->window_number + w, + NewGRFConfirmationCallback ); } else { CopyGRFConfigList(WP(w, newgrf_d).orig_list, *WP(w, newgrf_d).list); |