Commit Graph

6426 Commits

Author SHA1 Message Date
David Ludwig
4dd121471c 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
ab565ef643 WinRT: ugh, at least one file in an app's project seems to require C++/CX compilation.
Assuming this is true, that file might as well be the one that contains WinMain.
2013-09-16 22:43:12 -04:00
David Ludwig
5da0adaea5 WinRT: renamed SDL_winrt_main.cpp to indicate that it should only be used in non-XAML apps
This can break builds of existing SDL/WinRT apps.  To fix, remove the reference to SDL_winrt_main.cpp, then add a reference to the renamed file, SDL_winrt_main_NonXAML.cpp.  If you get a build error about a missing .winmd file, enable the /ZW compiler flag for that one file (at minimum).
2013-09-16 22:27:30 -04:00
David Ludwig
81dbaa1e44 WinRT: reduced the size of SDL_winrt_main.cpp by a little bit 2013-09-16 21:09:58 -04:00
David Ludwig
e7a27315f9 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
6610782740 WinRT: fixed a line-rendering bug in the D3D 11.1 backend 2013-09-16 00:31:01 -04:00
David Ludwig
374f121a28 WinRT: made SDL_winrt_main.cpp not have to be compiled as C++/CX (via the /ZW compiler flag)
This file can still be compiled as C++/CX, however that is now optional/not-required.
2013-09-15 23:53:51 -04:00
David Ludwig
bfbe514e68 WinRT: build fix for the SDL-WinRT-only .sln 2013-09-14 23:44:50 -04:00
David Ludwig
b0aa3ee259 WinRT: project-naming cleanup. Projects that link to SDL will need updating. To update:
1. remove references to SDL's project files from the Visual Studio Solution.  To note, these project files have been renamed, and will show up in Visual Studio with the text, "load failed".
2. add the SDL project files back into the Visual Studio Solution
3. for each project that should link to SDL, add a reference to it.  This can be done by right-clicking on it in Visual Studio, selecting "References...", clicking "Add New Reference", checking the box next to the SDL project, then closing each dialog by clicking OK.

SDL_mixer, SDL_ttf, and SDL_image for WinRT have been updated, and will be pushed to my Bitbucket repos with these changes having been made.  If you do not pull in these changes, be sure to re-add to them the reference to the SDL project, as described above.
2013-09-14 23:34:27 -04:00
David Ludwig
fac49b02af 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
a1286b5c60 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
f48360ea22 WinRT: removed chunks of C++ hack code from SDL_xaudio2.c 2013-09-06 19:23:42 -04:00
David Ludwig
0672afb236 WinRT: made SDL_xaudio2.c compile as C code when building for WinRT
XAudio2 2.8's header file, xaudio2.h, doesn't compile in plain C code for WinRT
apps, not automatically at least.  Initially, this file was adapted to compile
as C++, however these changes are now deprecated in favor of some preprocessor
based hacks that should get xaudio2.h to compile (while making sure XAudio2
still works).
2013-09-06 19:07:15 -04:00
David Ludwig
a70c094631 WinRT: minor code cleanup in SDL_xaudio2.c 2013-09-04 20:20:36 -04:00
David Ludwig
77688b3323 WinRT: more renaming of "windowsrt" to "winrt" 2013-09-04 19:55:45 -04:00
David Ludwig
3397778e0b WinRT: renamed a mouse-related header file for naming-consistency's sake 2013-09-02 15:29:46 -04:00
David Ludwig
fd735f66d7 WinRT: misc code cleanups regarding touch and mouse events, and also SDL-internal globals 2013-09-02 15:23:33 -04:00
David Ludwig
34c10841b6 WinRT: added touch input event support for Windows 8/RT devices 2013-09-01 10:20:17 -04:00
David Ludwig
54f017df15 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
971e8b2487 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
d713c2682e 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
59362ee702 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
46a76134a3 WinRT: removed a comment regarding a dealt-with TODO 2013-08-28 12:45:43 -04:00
David Ludwig
9523f29d5c WinRT: rendering orientation fixes for Windows Phone, part 1
This change should allow apps to render correctly in Portrait mode, at minimum,

Support for orientation changes is pending.

Thanks to Pierre-Yves for assistance!
2013-08-28 12:38:30 -04:00
David Ludwig
2c2aedbcdb WinRT: fixed a potential memory-related crash in SDL_Renderer on Windows Phone 2013-08-28 11:46:02 -04:00
David Ludwig
7c5173a181 WinRT: build fix for Windows Phone 2013-08-28 11:45:22 -04:00
David Ludwig
93507125de 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
df865dd615 WinRT: made all WinRT-related TODO comments use the same prefix, "TODO, WinRT" 2013-08-27 13:03:43 -04:00
David Ludwig
a054e1f200 WinRT: code cleanup wrt. display mode(s) 2013-08-27 12:56:49 -04:00
David Ludwig
278c571952 WinRT: renamed "windowsrt" directories to "winrt" 2013-08-27 12:33:36 -04:00
David Ludwig
b5bba1c457 WinRT: fixed a crash that occurred on device rotation (oops!) 2013-08-27 12:22:02 -04:00
David Ludwig
f34ae4e23f WinRT: more "Windows RT" to "WinRT" renaming 2013-08-27 12:20:35 -04:00
David Ludwig
23334b06c1 WinRT: took out a deprecated TODO-comment 2013-08-27 12:16:42 -04:00
David Ludwig
e2a0f9890c 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
2ebd518380 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
669aa12b7e 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
38bbbc27f9 WinRT: Windows Phone build fix 2013-08-27 11:40:06 -04:00
David Ludwig
558566d117 WinRT: misc code cleanups 2013-08-27 11:39:44 -04:00
David Ludwig
48fbe6839c 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.
2013-08-27 11:00:52 -04:00
David Ludwig
7e217f79c6 WinRT: minor function and variable name cleanup 2013-08-27 10:57:55 -04:00
David Ludwig
15ca970fc2 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
ccbeaad484 WinRT: removed a deprecated hack regarding window resizing and Direct3D viewports 2013-08-27 09:53:58 -04:00
David Ludwig
d74acd5aaa WinRT: moved most platform-specific keyboard and mouse code to shared locations 2013-08-26 17:17:53 -04:00
David Ludwig
2fda2633de WinRT: removed some old debugging code from SDL_mutexP and SDL_mutexV 2013-08-20 22:18:48 -04:00
David Ludwig
5187b903b9 WinRT: made a note that WinRT doesn't appear to support modifying a thread's priority 2013-08-20 22:16:09 -04:00
David Ludwig
772a538b7f WinRT: made SDL_ThreadID() return the native thread ID, rather than a fake one 2013-08-20 22:04:09 -04:00
David Ludwig
e27f29bfa9 WinRT: made testthread log output via SDL_Log
- this will allow output to be read via Visual C++'s Output pane
2013-08-20 21:55:13 -04:00
David Ludwig
6dbbcb0aab WinRT: made the C++11-based threading backend only try to catch exceptions that it knows it (the threading APIs) might throw, rather than all exceptions 2013-08-20 21:54:34 -04:00
David Ludwig
b59c3af461 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
David Ludwig
51cd30d786 WinRT: added a stub implementation of UpdateClipRect to the D3D 11.1 renderer 2013-08-13 20:33:15 -04:00