Commit graph

31 commits

Author SHA1 Message Date
Ozkan Sezer
c85ef4d8f9 configury, cmake: add check for endpointvolume.h :
add HAVE_ENDPOINTVOLUME_H, HAVE_MMDEVICEAPI_H and HAVE_AUDIOCLIENT_H
in SDL_config.h.in, SDL_config.h.cmake, SDL_config_windows.h, and in
SDL_config_winrt.h.
2018-09-28 13:41:04 +03:00
Sam Lantinga
2ca16d7410 Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
Ethan Lee
54ce812205 SDL_exp 2018-08-04 11:52:46 -04:00
Ethan Lee
8551a596fa SDL_log10 2018-01-17 11:53:09 -05:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Ryan C. Gordon
1745441419 audio: Port WASAPI to WinRT, remove XAudio2 backend.
XAudio2 doesn't have capture support, so WASAPI was to replace it; the holdout
was WinRT, which still needed it as its primary audio target until the WASAPI
code code be made to work.

The support matrix now looks like:

WinXP: directsound by default, winmm as a fallback for buggy drivers.
Vista+: WASAPI (directsound and winmm as fallbacks for debugging).
WinRT: WASAPI

--HG--
extra : amend_source : a28a9a9fbb09c4c25df05fa0a754fce0bee62335
extra : histedit_source : e5727ceb1a5db5806ce02534d8ffe4892eb6f5d9
2017-12-06 12:24:32 -05:00
Sam Lantinga
4e9aab5884 Added SDL_fmod() and SDL_fmodf() 2017-11-04 17:35:03 -07:00
Sam Lantinga
73a2b9ace8 Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits
Simon Hug

When RWops seeks with fseek or fseeko it uses the types long or off_t which can be 32 bits on some platforms. stdio_seek does not check if the 64-bit integer for the offset fits into a 32-bit integer. Offsets equal or larger than 2 GiB will have implementation-defined behavior and failure states would be very confusing to debug.

The attached patch adds range checking by using the macros from limits.h for long type and some bit shifting for off_t because POSIX couldn't be bothered to specify min and max macros.

It also defines HAVE_FSEEKI64 in SDL_config_windows.h so that the Windows function gets picked up automatically with the default config.

And there's an additional error message for when ftell fails.
2017-09-09 08:36:37 -07:00
Sam Lantinga
c1277f268e Updated config headers to override the base SDL_config.h if both are included 2017-02-20 10:55:33 -08:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
91e0a1d094 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
David Ludwig
028a80e83b 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
2015-11-29 19:33:11 -05:00
David Ludwig
c858ba8394 WinRT: bug-fix - SDL_SetThreadPriority() didn't work on WinRT 8.x platforms
WinRT 8.0 (Phone and non-Phone) didn't offer an API to set an already-created
thread's priority.  WinRT 8.1 offered this API, along with several other
Win32 thread functions that were previously unavailable (in WinRT).

This change makes WinRT 8.1+ platforms use SDL's Win32 backend.
2015-11-26 13:51:03 -05:00
David Ludwig
3f86649e74 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).
2015-11-26 00:41:39 -05:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Philipp Wiesemann
416e4bd62e Fixed copyright date. 2014-12-28 22:10:24 +01:00
David Ludwig
1415402579 WinRT: enabled OpenGL ES 2 support on Windows Phone
The "future-dev" branch of MSOpenTech's ANGLE/WinRT repository (at
https://github.com/msopentech/angle) includes support for Windows Phone 8.1.
This change allows it to be used in conjunction with SDL's OpenGL functions.
2014-11-02 10:32:25 -05:00
Sam Lantinga
b3e4782510 Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
Sam Lantinga
5acb7c63d1 Added SDL_round(), contributed by Benoit Pierre - thanks! 2014-08-16 23:23:15 -07:00
David Ludwig
ccd59359e6 Made the latest XInput + Haptic changes compile and run on WinRT
Notes:
- Support for the 'Guide' button does not seem to be possible, as
  XInputGetStateEx is not available on WinRT.
- Haptic support appears to be working on WinRT now!
- SDL/WinRT does not allow calls to LoadLibrary or LoadLibraryEx.  The calls
  to those were removed by this change, but only when compiling for WinRT.
  Non-WinRT Windows will continue to detect and load XInput via LoadLibrary and
  GetProcAddress calls.
2014-07-04 18:20:23 -04:00
Sam Lantinga
9cdeec59f3 Split the XInput and DirectInput code so Windows RT can use the existing XInput support.
--HG--
rename : src/audio/directsound/directx.h => src/core/windows/SDL_directx.h
rename : src/haptic/windows/SDL_syshaptic.c => src/haptic/windows/SDL_windowshaptic.c
rename : src/haptic/windows/SDL_syshaptic_c.h => src/haptic/windows/SDL_windowshaptic_c.h
rename : src/joystick/windows/SDL_dxjoystick.c => src/joystick/windows/SDL_dinputjoystick.c
rename : src/joystick/windows/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dinputjoystick_c.h
rename : src/joystick/windows/SDL_dxjoystick_c.h => src/joystick/windows/SDL_windowsjoystick_c.h
2014-07-03 15:39:55 -07:00
Sam Lantinga
276b7efecd Added SDL_sqrtf(), SDL_tan(), SDL_tanf() 2014-06-07 18:20:01 -07:00
Ryan C. Gordon
a8ab12a0d6 Fix build on Windows targets without dxgi.h, like MingW32. 2014-05-06 00:13:07 -04:00
David Ludwig
7ba3100244 Fixed various build and runtime errors when using WinRT with VS2012. 2014-03-12 11:57:15 -04:00
Sam Lantinga
211b54deef Fixed line endings on WinRT source code 2014-03-09 11:06:11 -07:00
David Ludwig
fcbc582b23 WinRT: enabled OpenGL ES 2 support by default
A copy of ANGLE/WinRT is still needed to run OpenGL content, but is not needed to compile SDL/WinRT.
2013-12-21 10:08:11 -05:00
David Ludwig
a21be44a15 WinRT: removed a now-complete TODO comment regarding Direct3D 11 2013-11-29 00:21:56 -05:00
David Ludwig
a4f050087d WinRT: enable the OpenGL ES 2 SDL_Renderer backend, if and when OpenGL ES 2 support is compiled in 2013-11-29 00:19:46 -05:00
David Ludwig
a5069b7ae1 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
4348ee8893 WinRT: more renaming of "windowsrt" to "winrt"
--HG--
rename : include/SDL_config_windowsrt.h => include/SDL_config_winrt.h
2013-09-04 19:55:45 -04:00
Renamed from include/SDL_config_windowsrt.h (Browse further)