early-access version 1617
This commit is contained in:
@@ -36,7 +36,6 @@ using Windows::UI::Core::CoreCursor;
|
||||
#include "../../core/winrt/SDL_winrtapp_common.h"
|
||||
#include "../../core/winrt/SDL_winrtapp_direct3d.h"
|
||||
#include "../../core/winrt/SDL_winrtapp_xaml.h"
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_system.h"
|
||||
|
||||
extern "C" {
|
||||
|
@@ -25,7 +25,7 @@
|
||||
/* Windows includes */
|
||||
#include <roapi.h>
|
||||
#include <windows.foundation.h>
|
||||
#include <EventToken.h>
|
||||
#include <windows.system.h>
|
||||
|
||||
|
||||
/* SDL includes */
|
||||
|
@@ -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>((int)(sdlButton - messageboxdata->buttons));
|
||||
button->Id = IntPtr((int)((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>((int)(operation->GetResults()->Id));
|
||||
IntPtr results = safe_cast<IntPtr>(operation->GetResults()->Id);
|
||||
int clicked_index = results.ToInt32();
|
||||
*buttonid = messageboxdata->buttons[clicked_index].buttonid;
|
||||
}
|
||||
|
@@ -34,12 +34,10 @@ using Windows::UI::Core::CoreCursor;
|
||||
* SDL includes:
|
||||
*/
|
||||
extern "C" {
|
||||
#include "SDL_assert.h"
|
||||
#include "../../events/SDL_mouse_c.h"
|
||||
#include "../../events/SDL_touch_c.h"
|
||||
#include "../SDL_sysvideo.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_log.h"
|
||||
}
|
||||
|
||||
#include "../../core/winrt/SDL_winrtapp_direct3d.h"
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include "SDL_winrtevents_c.h"
|
||||
#include "SDL_winrtmouse_c.h"
|
||||
#include "SDL_winrtvideo_cpp.h"
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_system.h"
|
||||
|
||||
extern "C" {
|
||||
|
13
externals/SDL/src/video/winrt/SDL_winrtvideo.cpp
vendored
13
externals/SDL/src/video/winrt/SDL_winrtvideo.cpp
vendored
@@ -67,7 +67,6 @@ extern "C" {
|
||||
#include "SDL_winrtmouse_c.h"
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_system.h"
|
||||
//#include "SDL_log.h"
|
||||
|
||||
|
||||
/* Initialization/Query functions */
|
||||
@@ -96,12 +95,6 @@ SDL_Window * WINRT_GlobalSDLWindow = NULL;
|
||||
|
||||
/* WinRT driver bootstrap functions */
|
||||
|
||||
static int
|
||||
WINRT_Available(void)
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
WINRT_DeleteDevice(SDL_VideoDevice * device)
|
||||
{
|
||||
@@ -175,7 +168,7 @@ WINRT_CreateDevice(int devindex)
|
||||
#define WINRTVID_DRIVER_NAME "winrt"
|
||||
VideoBootStrap WINRT_bootstrap = {
|
||||
WINRTVID_DRIVER_NAME, "SDL WinRT video driver",
|
||||
WINRT_Available, WINRT_CreateDevice
|
||||
WINRT_CreateDevice
|
||||
};
|
||||
|
||||
int
|
||||
@@ -300,7 +293,7 @@ WINRT_AddDisplaysForOutput (_THIS, IDXGIAdapter1 * dxgiAdapter1, int outputIndex
|
||||
}
|
||||
}
|
||||
|
||||
if (SDL_AddVideoDisplay(&display) < 0) {
|
||||
if (SDL_AddVideoDisplay(&display, SDL_FALSE) < 0) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -383,7 +376,7 @@ WINRT_AddDisplaysForAdapter (_THIS, IDXGIFactory2 * dxgiFactory2, int adapterInd
|
||||
display.desktop_mode = mode;
|
||||
display.current_mode = mode;
|
||||
if ((SDL_AddDisplayMode(&display, &mode) < 0) ||
|
||||
(SDL_AddVideoDisplay(&display) < 0))
|
||||
(SDL_AddVideoDisplay(&display, SDL_FALSE) < 0))
|
||||
{
|
||||
return SDL_SetError("Failed to apply DXGI Display-detection workaround");
|
||||
}
|
||||
|
Reference in New Issue
Block a user