From c61ca915fb59d81b89dafe071c9420ac98fd6d4b Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Wed, 2 Oct 2019 14:55:02 -0400 Subject: [PATCH] WinRT: fix a link-time error when building UWP + x64 --- src/video/winrt/SDL_winrtmessagebox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/winrt/SDL_winrtmessagebox.cpp b/src/video/winrt/SDL_winrtmessagebox.cpp index 3c7289144..118dc904d 100644 --- a/src/video/winrt/SDL_winrtmessagebox.cpp +++ b/src/video/winrt/SDL_winrtmessagebox.cpp @@ -82,7 +82,7 @@ WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) sdlButton = &messageboxdata->buttons[i]; } UICommand ^ button = ref new UICommand(WINRT_UTF8ToPlatformString(sdlButton->text)); - button->Id = safe_cast(sdlButton - messageboxdata->buttons); + button->Id = safe_cast((int)(sdlButton - messageboxdata->buttons)); dialog->Commands->Append(button); if (sdlButton->flags & SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT) { dialog->CancelCommandIndex = i; @@ -104,7 +104,7 @@ WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) return SDL_SetError("An unknown error occurred in displaying the WinRT MessageDialog"); } if (buttonid) { - IntPtr results = safe_cast(operation->GetResults()->Id); + IntPtr results = safe_cast((int)(operation->GetResults()->Id)); int clicked_index = results.ToInt32(); *buttonid = messageboxdata->buttons[clicked_index].buttonid; }