Forráskód Böngészése

Return correct button id

meyraud705 4 éve
szülő
commit
d0cf3b7555
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/video/wayland/SDL_waylandmessagebox.c

+ 1 - 1
src/video/wayland/SDL_waylandmessagebox.c

@@ -167,7 +167,7 @@ Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
                     for (i = 0; i < messageboxdata->numbuttons; i += 1) {
                         if (messageboxdata->buttons[i].text != NULL) {
                             if (SDL_strcmp(output, messageboxdata->buttons[i].text) == 0) {
-                                *buttonid = i;
+                                *buttonid = messageboxdata->buttons[i].buttonid;
                                 break;
                             }
                         }