src/core/winrt


Log

Author Commit Date CI Message
pionere ebdd5366 2022-01-17T16:26:02 use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sam Lantinga e04a0221 2021-11-27T09:36:44 Fixed crash running SDL test programs on UWP
Ryan C. Gordon 350ca0f9 2021-08-03T04:57:53 winrt: Don't register orientation hint callback in startup code. SDL_AddHintCallback() uses SDL_malloc(), which means this would run before main(), so the app wouldn't be able to supply its own replacement SDL_malloc() implementation in time. This code was moved to under SDL_Init. Since the hint callback already makes efforts to not override the app manifest's orientation settings, this is safe to move until after pre-main() startup. Fixes #4449.
Ethan Lee be5356af 2021-05-14T14:44:13 winrt: Fix support for multiple simultaneous mouse button presses
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga cb361896 2020-12-09T07:16:22 Fixed bug 5235 - All internal sources should include SDL_assert.h Ryan C. Gordon We should really stick this in SDL_internal.h or something so it's always available.
Sam Lantinga b6afbe63 2020-04-07T09:38:57 Added SDL_log.h to SDL_internal.h so logging is available everywhere
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Sam Lantinga b2e76d86 2019-03-19T16:52:09 Fixed Windows RT build
Sam Lantinga de82759c 2019-03-19T07:53:33 Added support for building SDL as a dynamic library on iOS
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sam Lantinga 5febdfce 2018-09-24T11:49:25 Fixed whitespace
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Ryan C. Gordon 027d63bc 2017-12-31T03:36:54 winrt: workaround for pre-UWP builds. There's probably a better way to do this for legacy platforms, though.
Sam Lantinga baae74c8 2017-12-10T09:10:02 Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on (thanks Daniel Knobe!)
David Ludwig 0e032d58 2017-10-24T13:21:11 WinRT: Move Windows::Foundation::Initialize to SDL2.dll, from SDL_main. This allows C# UWP applications to use SDL2's SDL_WinRTRunApp function. Kudos to Ethan Lee (flibitijibibo@flibitijibibo.com) for the patch. Thanks!
David Ludwig 78b83d3a 2017-09-11T18:20:56 WinRT: build fix when using recent versions of the Windows 10 SDK
Sam Lantinga 0d011ec6 2017-08-28T00:22:23 Renaming of guard header names to quiet -Wreserved-id-macro
Sam Lantinga de91b124 2017-08-14T06:28:21 Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks Patches contributed by Ozkan Sezer
Philipp Wiesemann 4b47fa38 2017-06-04T23:15:47 Removed duplicate includes.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 27d4f099 2016-10-07T23:40:44 Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
David Ludwig 8b65d225 2016-04-11T00:22:39 WinRT: bug hack-fix - gamepad detection was failing on Xbox One Win10's 'GamepadAdded' event seems to need to have something registered with it in order for Xinput-based gamepad detection to work. This 'fix' simply causes a dummy event-handler to be added for this event, in case an app wants to use gamepads on Xbox One (most likely).
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
David Ludwig 44c0b2da 2015-12-31T01:54:11 WinRT: minor code-comment cleanups
David Ludwig 6823a221 2015-12-31T01:50:30 WinRT: fixed bug whereby a Win8.x app's SDL_Window wasn't getting de-marked as maximized (on window restore)
David Ludwig d8aa0662 2015-12-31T01:40:50 Fixed Bug 3217 - WinRT: after alt-tab'ing back into fullscreen app, mouse cursor is sometimes wrong
David Ludwig fa7c15ce 2015-12-27T22:26:27 WinRT: made bug 3202/3213's fix apply for WinRT apps
David Ludwig f2f435ee 2015-12-09T21:34:56 WinRT: fixed bug: Back button(s) weren't working on Win10 Many thanks go to Sylvain Becker for providing details on the fix!
David Ludwig 25abce51 2015-11-29T19:33:11 WinRT: added Win10/UWP (Universal Windows Platform) support "UWP" appears to be Microsoft's new name for WinRT/Windows-Store APIs. This set of changes updates SDL's WinRT backends to support the Win10 flavor of WinRT. It has been tested on Win10 on a desktop. In theory, it should also support Win10 on other devices (phone, Xbox One, etc.), however further patches may be necessary. This adds: - a set of MSVC 2015 project files, for use in creating UWP apps - modifications to various pieces of SDL, in order to compile via MSVC 2015 + the Win10 API set - enables SDL_Window resizing and programmatic-fullscreen toggling, when using the WinRT backend - WinRT README updates
David Ludwig 623898f7 2015-11-26T00:41:39 WinRT: lots of display and windowing related fixes This change-set fixes a lot of windowing related bugs, especially with regards to Windows 8.x apps running on Windows 10 (which was the driver for this work). The primary fixes include: * listed display modes were wrong, especially when launching apps into a non-fullscreen space * reported window flags were often wrong, especially on Windows 10 * fullscreen/windowed mode switches weren't failing (they are not programmatically possible in Win 8.x apps).
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
Philipp Wiesemann 86c5c3f2 2015-01-08T21:45:46 Replaced include of SDL_types.h with SDL_stdinc.h in internal header file. SDL_types.h is deprecated and currently only includes SDL_stdinc.h itself.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
David Ludwig 6a5b3bb4 2014-11-26T21:34:15 WinRT: added initial SDL_TEXTINPUT support Further support regarding IME and on-screen keyboards is pending, some of which might not be 100% compatible with other platforms, given WinRT platform restrictions. An MSDN article at http://msdn.microsoft.com/en-us/library/windows/apps/hh465404.aspx indicates that on-screen keyboard display requires that the user first tap on a Windows/XAML text control. This change adds basic SDL_TEXTINPUT support, with input coming from hardware keyboards, at a minimum, and without the need for XAML integration (which is still pending integration into SDL, by and large).
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
David Ludwig 164e5b89 2014-05-09T21:28:52 WinRT: display-information code cleanups
David Ludwig 0a879d63 2014-05-09T20:16:21 Fixed rendering-alignment issues on WinPhone 8.1, when the device was rotated If a Windows Phone 8.1 device was rotated to anything but Portrait mode, the Direct3D 11 renderer's output wouldn't get aligned correctly with the screen.
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
David Ludwig a99bf4d7 2014-03-24T22:51:03 WinRT: Call IDXGIDevice3::Trim before app-suspend, as required on Windows 8.1 Thanks to Sylvain Becker for pointing this out!
David Ludwig cbf71846 2014-03-24T22:12:38 WinRT: Line ending fixes (CRLF to LF)
David Ludwig c2243092 2014-03-23T11:04:47 WinRT: Miscellaneous app-backgrounding/restoring event fixes and additions SDL_WINDOWEVENT_FOCUS_LOST is now sent when an app's native window is hidden. Likewise, SDL_WINDOWEVENT_FOCUS_GAINED is sent when an app's window is shown. This mimicks behavior seen on iOS and Android. SDL_WINDOWEVENT_MINIMIZED and SDL_WINDOWEVENT_RESTORED are now sent when the app's native window is hidden and shown. Previously, these were sent when an app was suspended and resumed. On Windows 8.x/RT, an app may be sent to the background without being suspended, which previously meant that SDL_WINDOWEVENT_MINIMIZED might never have been sent. (On Windows Phone 8, however, this seems to be different, whereby apps sent to the background appear to always get suspended.)
David Ludwig 50ee99ec 2014-03-23T08:56:52 WinRT: Made app-backgrounded events get sent at separate, distinct times. SDL_APP_WILLENTERBACKGROUND is now sent as soon as the app is told that it is about to go to the background. SDL_APP_DIDENTERBACKGROUND is sent via a WinRT 'deferral operation', which is how WinRT gives apps a bit of extra time (multiple seconds worth) to prepare for an app-backgrounding. The distinction may be important as the deferral operation's code is always run in a separate thread. For Direct3D-only apps, this means that between the two SDL app-backgrounded events, SDL_APP_WILLENTERBACKGROUND will be the only one run from the main thread. Given that some WinRT operations can only be done on the main thread (operations to the CoreWindow fall into this category), this could be important. It is important to note that pre-deferral code may only have a very short bit of time to execute code, less so than code run in the deferral operation (where SDL_APP_DIDENTERBACKGROUND is sent from), which usually gets several seconds to run.
David Ludwig 823bf721 2014-03-22T21:08:05 WinRT globals cleanup: Removed WINRT_GlobalSDLVideoDevice
David Ludwig f25ee50b 2014-03-15T14:54:23 Fixed broken rotation detection routines on WinRT Rotation detection and handling should now work across all, publicly-released, WinRT-based platforms (Windows 8.0, Windows 8.1, and Windows Phone 8.0).
Sam Lantinga f9a58968 2014-03-13T21:21:26 Added missing copyright notices
Sam Lantinga ed02f61d 2014-03-13T00:40:08 Fixed the copyright date on files contributed by David Ludwig
David Ludwig 646cdedb 2014-03-12T12:14:47 Fixed line endings (CRLF to LF) in WinRT source code
David Ludwig 4cd5ed7b 2014-03-12T12:12:20 Merged various WinRT build fixes
David Ludwig b68b6e23 2014-03-12T11:57:15 Fixed various build and runtime errors when using WinRT with VS2012.
Sam Lantinga 641ba099 2014-03-12T07:26:07 Fixed compiling Windows RT code on Visual Studio 2013
David Ludwig e8eb1427 2014-03-10T21:21:35 build fixes for most WinRT-related files Still TODO: getting the D3D11 renderer back up and running in VC 2012.
Sam Lantinga 05c23063 2014-03-09T11:06:11 Fixed line endings on WinRT source code
David Ludwig 61ae0c1b 2014-03-04T19:49:11 WinRT: emit SDL_APP_TERMINATING
David Ludwig 844ad500 2014-03-04T19:30:36 WinRT: emit SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events
David Ludwig 6687ece1 2014-03-01T16:37:30 WinRT: cleaned up some hard-to-read SDL_DisplayMode management code
David Ludwig f4a5a0fa 2014-03-01T16:08:16 WinRT: fixed a crash in SDL_Quit SDL was expected that each SDL_DisplayMode had a driverdata field that was SDL_malloc'ed, and was calling SDL_free on them. This change moves WinRT's driverdata content into a SDL_malloc'ed field.
David Ludwig abfbed92 2014-01-26T08:06:36 WinRT: simulate keyboard events on Windows Phone 8 back-button presses Pressing the hardware back button on a Windows Phone 8 device will now cause SDL to emit a pair of key-down and key-up events, with the SDL scancode, SDL_SCANCODE_AC_BACK. By default, if WinRT's native back-button-press events are not explicitly marked as 'handled', then Windows Phone will terminate the app. More details on Microsoft's reasoning behind this can be found on MSDN, at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx To mark back-button-press events as 'handled', set SDL_HINT_WINRT_HANDLE_BACK_BUTTON to 1. Setting it to anything else will cause these events to not be marked as 'handled'. Due to limitations in Windows Phone's APIs, SDL will emit a virtual key-up event immediately after the back button's key-down event is registered. Unfortunately, Windows Phone 8 only allows one to register for back-button-press events, and not back-button-release events.
David Ludwig 7eaa3cd8 2014-01-01T16:05:37 WinRT: added a means to display a privacy policy link via the Settings charm This change is only relevant for Windows 8, 8.1, and RT apps, and only for those that are network-enabled. Such apps must feature a link to a privacy policy, which must be displayed via the Windows Settings charm. This is needed to pass Windows Store app-certification. Using SDL_SetHint, along with SDL_HINT_WINRT_PRIVACY_POLICY_URL and optionally SDL_HINT_WINRT_PRIVACY_POLICY_LABEL, will cause SDL/WinRT to create a link inside the Windows Settings charm, as invoked from within an SDL-based app. Network-enabled Windows Phone apps do not need to set this hint, and should provide some sort of in-app means to display their privacy policy. Microsoft does not appear to provide an OS-integrated means for displaying such on Windows Phone.
David Ludwig da0c0a4a 2013-11-28T21:15:05 WinRT: fixed bug: touch input coordinates weren't normalized [0..1] Thanks to Pierre-Yves for pointing this out and providing a fix!
David Ludwig 3236fc3a 2013-10-28T15:41:22 WinRT: implemented SDL_GetBasePath and SDL_GetPrefPath
David Ludwig 6004b764 2013-09-22T23:17:25 WinRT: added missing files
David Ludwig 58dd0864 2013-09-22T12:26:53 WinRT: unified the two, public, app-init functions This function, SDL_WinRTRunApp, can be used to help launch either XAML or non-XAML/Direct3D-only based apps.
David Ludwig 34722465 2013-09-06T21:13:15 WinRT: code cleanup: attempted to make it more clear what code is specific to what app type (plain Direct3D or XAML)
David Ludwig de8d9dbb 2013-09-06T21:00:52 WinRT: minor code cleanup regarding events Some event handling functions got sorted in a somewhat consistent manner, and in some cases, were also segregated a bit from app-lifecycle code.
David Ludwig 7e06b806 2013-09-02T15:23:33 WinRT: misc code cleanups regarding touch and mouse events, and also SDL-internal globals
David Ludwig 13c87e71 2013-08-28T16:14:27 WinRT: made simulated-mouse (via touch) input work on Windows Phone in Portrait mode Proper SDL_MOUSE* event support for non-Portrait orientations in Windows Phone is pending.
David Ludwig 31235b4b 2013-08-28T15:27:01 WinRT: made rendering work with orientation changes on Windows Phone Pointer event geometry still needs to be adjusted on Windows Phone, to note.
David Ludwig 2cafee9d 2013-08-27T21:21:09 WinRT: experimental and preliminary support for XAML-based overlays on Windows 8/RT The XAML support here is still rudimentary. Bugs do exist. You've been warned. XAML support in Windows Phone 8 is not yet available (in SDL/WinRT).
David Ludwig 86ea4c4e 2013-08-27T13:03:43 WinRT: made all WinRT-related TODO comments use the same prefix, "TODO, WinRT"
David Ludwig 17ca1d00 2013-08-27T12:56:49 WinRT: code cleanup wrt. display mode(s)
David Ludwig 1e78c4a5 2013-08-27T12:20:35 WinRT: more "Windows RT" to "WinRT" renaming
David Ludwig 6dc2a410 2013-08-27T12:13:45 WinRT: moved the WinRT SDL_VideoDevice out of SDL_WinRTApp This was done to help pave the way for XAML support.
David Ludwig 253b9aae 2013-08-27T11:51:17 WinRT: moved the pointer to the global SDL_Window to a separate variable This is a cleanup that is being done to help with WIP XAML support. It may be reverted in the future.
David Ludwig 3e83fd78 2013-08-27T11:39:44 WinRT: misc code cleanups
David Ludwig f8e80edf 2013-08-27T11:00:52 WinRT: removed more hack-code that attempted to help have non-standard window sizes "Non-standard" is defined here as any window size that differs from that provided by WinRT's CoreWindow.
David Ludwig 80abfc4d 2013-08-27T10:57:55 WinRT: minor function and variable name cleanup
David Ludwig 065b2cf4 2013-08-27T10:56:10 WinRT: made all SDL_Windows get sized to the WinRT-defined window size This change removes some code that attempted to allow non-standard window sizes, the idea of which was to do display scaling, and a hackish one at that. If display scaling is needed, use SDL_Renderer as appropriate.
David Ludwig 409d9b1c 2013-08-27T09:53:58 WinRT: removed a deprecated hack regarding window resizing and Direct3D viewports
David Ludwig d78b26ed 2013-08-26T17:17:53 WinRT: moved most platform-specific keyboard and mouse code to shared locations
David Ludwig 19a168b4 2013-08-20T21:22:32 WinRT: file naming and placement cleanup - moved SDL_WinRTApp.* from src/video/windowsrt/ to src/core/winrt/, and renamed them to SDL_winrtapp.* (to mimick case-sensitivity used elsewhere in SDL) - renamed all "windowsrt" directories (in src) to "winrt", as the shorthand name is used more often (and, IMO, "WinRT" != "Windows RT", not entirely at least)