src/video/windows/SDL_windowsmessagebox.c
changeset 11228 af4c3dc6b97f
parent 11037 5fde5f7e2912
child 11236 8c3cba28b1fd
     1.1 --- a/src/video/windows/SDL_windowsmessagebox.c	Fri Aug 11 19:36:12 2017 -0700
     1.2 +++ b/src/video/windows/SDL_windowsmessagebox.c	Fri Aug 11 19:42:39 2017 -0700
     1.3 @@ -463,7 +463,7 @@
     1.4          } else {
     1.5              isDefault = SDL_FALSE;
     1.6          }
     1.7 -        if (!AddDialogButton(dialog, x, y, ButtonWidth, ButtonHeight, buttons[i].text, i, isDefault)) {
     1.8 +        if (!AddDialogButton(dialog, x, y, ButtonWidth, ButtonHeight, buttons[i].text, buttons[i].buttonid, isDefault)) {
     1.9              FreeDialogData(dialog);
    1.10              return -1;
    1.11          }
    1.12 @@ -476,8 +476,7 @@
    1.13          ParentWindow = ((SDL_WindowData*)messageboxdata->window->driverdata)->hwnd;
    1.14      }
    1.15  
    1.16 -    which = DialogBoxIndirect(NULL, (DLGTEMPLATE*)dialog->lpDialog, ParentWindow, (DLGPROC)MessageBoxDialogProc);
    1.17 -    *buttonid = buttons[which].buttonid;
    1.18 +    *buttonid = DialogBoxIndirect(NULL, (DLGTEMPLATE*)dialog->lpDialog, ParentWindow, (DLGPROC)MessageBoxDialogProc);
    1.19  
    1.20      FreeDialogData(dialog);
    1.21      return 0;