WinRT: fix a link-time error when building UWP + x64
authorDavid Ludwig <dludwig@pobox.com>
Wed, 02 Oct 2019 14:55:02 -0400
changeset 13104e896a6e84cf8
parent 13103 1b1cdbe1cad5
child 13105 db9d0d0b7ebc
WinRT: fix a link-time error when building UWP + x64
src/video/winrt/SDL_winrtmessagebox.cpp
     1.1 --- a/src/video/winrt/SDL_winrtmessagebox.cpp	Tue Oct 01 08:50:04 2019 -0700
     1.2 +++ b/src/video/winrt/SDL_winrtmessagebox.cpp	Wed Oct 02 14:55:02 2019 -0400
     1.3 @@ -82,7 +82,7 @@
     1.4              sdlButton = &messageboxdata->buttons[i];
     1.5          }
     1.6          UICommand ^ button = ref new UICommand(WINRT_UTF8ToPlatformString(sdlButton->text));
     1.7 -        button->Id = safe_cast<IntPtr>(sdlButton - messageboxdata->buttons);
     1.8 +        button->Id = safe_cast<IntPtr>((int)(sdlButton - messageboxdata->buttons));
     1.9          dialog->Commands->Append(button);
    1.10          if (sdlButton->flags & SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT) {
    1.11              dialog->CancelCommandIndex = i;
    1.12 @@ -104,7 +104,7 @@
    1.13          return SDL_SetError("An unknown error occurred in displaying the WinRT MessageDialog");
    1.14      }
    1.15      if (buttonid) {
    1.16 -        IntPtr results = safe_cast<IntPtr>(operation->GetResults()->Id);
    1.17 +        IntPtr results = safe_cast<IntPtr>((int)(operation->GetResults()->Id));
    1.18          int clicked_index = results.ToInt32();
    1.19          *buttonid = messageboxdata->buttons[clicked_index].buttonid;
    1.20      }