Commit Graph

36 Commits (7a36070a95010fff87d572e9d700cff87d74706a)

Author SHA1 Message Date
David Ludwig e8eb142748 build fixes for most WinRT-related files
Still TODO: getting the D3D11 renderer back up and running in VC 2012.
2014-03-10 21:21:35 -04:00
Sam Lantinga 05c23063bb Fixed line endings on WinRT source code 2014-03-09 11:06:11 -07:00
David Ludwig 6687ece1d5 WinRT: cleaned up some hard-to-read SDL_DisplayMode management code 2014-03-01 16:37:30 -05:00
David Ludwig f4a5a0fad1 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.
2014-03-01 16:08:16 -05:00
David Ludwig 910c1cd0a0 WinRT: minor error cleanup regarding OpenGL init 2013-12-26 14:21:47 -05:00
David Ludwig 0dfde14d35 WinRT: took out some dead comments from SDL_winrtopengles.cpp 2013-12-26 14:13:20 -05:00
David Ludwig fed81d121a WinRT: fixed crash on ARM and x64 during OpenGL window init 2013-12-26 13:59:01 -05:00
David Ludwig 27e79b93ec WinRT: bug fix: game-controller/joystick button-down events weren't getting sent 2013-12-24 21:08:11 -05:00
David Ludwig ecfbb3f5dc WinRT: got the SDL-official OpenGL ES 2 changes working, in an experimental state 2013-11-28 22:59:21 -05:00
David Ludwig da0c0a4a33 WinRT: fixed bug: touch input coordinates weren't normalized [0..1]
Thanks to Pierre-Yves for pointing this out and providing a fix!
2013-11-28 21:15:05 -05:00
David Ludwig 749117acd9 WinRT: added experimental OpenGL ES 2.0 support
A port of the ANGLE library (OpenGL ES 2.0 for Direct3D) to WinRT, via https://github.com/stammen/angleproject, is used as a base.

To enable, clone 'angleproject' into the directory one above where SDL/WinRT is, open the file SDL/include/SDL_config_winrt.h, and uncomment the #defines that begin with 'SDL_VIDEO_OPENGL'.  From there, apps can create an OpenGL capable SDL_Window via the flag, SDL_WINDOW_OPENGL, and an OpenGL ES 2 context via SDL_GL_CreateContext.  The Direct3D 11.1 renderer cannot be used alongside SDL_WINDOW_OPENGL.  Only Windows 8/8.1 is supported for now.  Shaders may need to be precompiled, in some (all?) cases.
2013-11-04 19:54:29 -05:00
David Ludwig e64e3d8c27 WinRT: fixed two bugs regarding mouse events
The first bug had mouse motion events not getting sent out on non-touch devices, if and when a mouse button wasn't pressed.

The second bug caused virtual mouse motion events to get sent out-of-order on touch devices: the motion event would get sent after the touch occurred, rather than before.
2013-10-27 14:31:57 -04:00
David Ludwig 58dd086487 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.
2013-09-22 12:26:53 -04:00
David Ludwig 0022dbf261 WinRT: made SDL_GetWindowWMInfo return window data in a slightly easier-to-use format
Having the window pointer available as a WinRT IInspectable should make it a bit easier to use in conjunction with WRL-based weak references.
2013-09-16 11:02:18 -04:00
David Ludwig 34722465d1 WinRT: code cleanup: attempted to make it more clear what code is specific to what app type (plain Direct3D or XAML) 2013-09-06 21:13:15 -04:00
David Ludwig de8d9dbb93 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.
2013-09-06 21:00:52 -04:00
David Ludwig 8fc04cc76e WinRT: renamed a mouse-related header file for naming-consistency's sake 2013-09-02 15:29:46 -04:00
David Ludwig 7e06b806ac WinRT: misc code cleanups regarding touch and mouse events, and also SDL-internal globals 2013-09-02 15:23:33 -04:00
David Ludwig a94e41854a WinRT: added touch input event support for Windows 8/RT devices 2013-09-01 10:20:17 -04:00
David Ludwig dbdc4b84ec WinRT: added touch-event support for Windows Phone devices
Support for touch events in Windows 8/RT is pending on further R+D.
2013-08-29 10:32:16 -04:00
David Ludwig 1d5082d815 WinRT: corrected SDL_MOUSE* coordinates in non-Portrait modes
Thanks to Pierre-Yves Gueniffey for proper pointer geometry transform code!
2013-08-28 16:51:07 -04:00
David Ludwig 13c87e712b 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.
2013-08-28 16:14:27 -04:00
David Ludwig 31235b4b99 WinRT: made rendering work with orientation changes on Windows Phone
Pointer event geometry still needs to be adjusted on Windows Phone, to note.
2013-08-28 15:27:01 -04:00
David Ludwig 2cafee9de1 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).
2013-08-27 21:21:09 -04:00
David Ludwig 17ca1d00b5 WinRT: code cleanup wrt. display mode(s) 2013-08-27 12:56:49 -04:00
David Ludwig fa229f3790 WinRT: fixed a crash that occurred on device rotation (oops!) 2013-08-27 12:22:02 -04:00
David Ludwig 1e78c4a5d1 WinRT: more "Windows RT" to "WinRT" renaming 2013-08-27 12:20:35 -04:00
David Ludwig 3070086431 WinRT: took out a deprecated TODO-comment 2013-08-27 12:16:42 -04:00
David Ludwig 6dc2a410eb WinRT: moved the WinRT SDL_VideoDevice out of SDL_WinRTApp
This was done to help pave the way for XAML support.
2013-08-27 12:13:45 -04:00
David Ludwig 253b9aae89 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.
2013-08-27 11:51:17 -04:00
David Ludwig 7be2ad71c9 WinRT: renamed SDL_SYSWM_WINDOWSRT to SDL_SYSWM_WINRT
This is part of an overall effort to use the name, "WinRT", rather than "WindowsRT" (or "Windows RT"), as the shorthand name often seems to mean something different than the longhand name.  (WinRT is an API, Windows RT is a product name)
2013-08-27 11:44:43 -04:00
David Ludwig 3e83fd784c WinRT: misc code cleanups 2013-08-27 11:39:44 -04:00
David Ludwig 80abfc4d60 WinRT: minor function and variable name cleanup 2013-08-27 10:57:55 -04:00
David Ludwig 065b2cf470 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.
2013-08-27 10:56:10 -04:00
David Ludwig d78b26ed69 WinRT: moved most platform-specific keyboard and mouse code to shared locations 2013-08-26 17:17:53 -04:00
David Ludwig 19a168b4b3 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)
2013-08-20 21:22:32 -04:00