Commit 282e4c65bf58ffd0e0707ecc269ab3272c423c1b

Ryan C. Gordon 2020-07-31T19:42:23

winrt: Patched to compile...? Microsoft's C++/CX is weird, no idea if this will actually fix it. :/

diff --git a/src/video/winrt/SDL_winrtmessagebox.cpp b/src/video/winrt/SDL_winrtmessagebox.cpp
index 285023d..a287706 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<IntPtr>((size_t)(sdlButton - messageboxdata->buttons));
+        button->Id = (IntPtr)((size_t)(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<IntPtr>((size_t)(operation->GetResults()->Id));
+        IntPtr results = (IntPtr)((size_t)(operation->GetResults()->Id));
         int clicked_index = results.ToInt32();
         *buttonid = messageboxdata->buttons[clicked_index].buttonid;
     }