Commit graph

98 commits

Author SHA1 Message Date
Sam Lantinga
af32a2f4cd Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sylvain Becker
56c63a1dac Warnings: fix a documentation warning and missing prototypes 2018-12-05 16:13:12 +01:00
Ozkan Sezer
cc035dcc4f fix bug #4362 - SDL_syswm.h with SDL_PROTOTYPES_ONLY broken in C++ mode 2018-11-06 20:50:24 +03:00
Ryan C. Gordon
8a700e7a89 mir: Removed mir client support.
Fixes Bugzilla #4288.
2018-11-02 21:34:17 -04:00
Sam Lantinga
31a9517639 Fixed bug 4159 - Windows headers are included after packing alignment change
lectem

The SDL_syswm.h header includes the windows.h header after including begin_code.h which changes the structure packing alignment.

It seems this is not safe as suggested by the following warning :
warning C4121: 'JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V2': alignment of a member was sensitive to packing
2018-05-07 19:26:02 -07:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
cc7adb5695 Fixed bug 3752 - minor os2 defines
Ozkan Sezer

Attached three patches, so these minor os/2 bits get registered mainstream:

1. SDL_syswm.h: add SDL_SYSWM_OS2 to SDL_SYSWM_TYPE enum
2. SDL_platform.h: recognize __EMX__ too as __OS2__
3. begin_code.h: set SDLCALL as _System for OS/2.
2017-08-14 10:15:38 -07:00
Ryan C. Gordon
4239fb0f6d syswm: prevent buffer overflow if SDL and app have different config headers.
This only affects Wayland and DirectFB, as a Unix system generally has X11
support. Other platforms also have different sizes for the C union in
question, but are likely the only target for that platform, etc.

Apps that might run on Wayland or DirectFB will need to be compiled against
new headers from an official 2.0.6 release, or be prepared to force the x11
target, or not use SDL_GetWindowWMInfo().

Fixes Bugzilla #3428.

--HG--
extra : rebase_source : 281e37767b92a1a0b9ddbf3efb246d4932126412
2017-06-11 00:50:26 -04:00
Philipp Wiesemann
3e556aa92e Fixed comments in headers for doxygen output. 2017-06-04 23:15:39 +02: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
55a3debc38 Fixed bug 3486 - Can't get HINSTANCE of my window
realitix

SDL2 allows to create widow and to get information through SDL_SysWMinfo.
But it misses something, with Vulkan, you need the HWND and HINSTANCE of the window for Win32 system.
Sadly, SDL2 provides only HWND but not HINSTANCE.

In some context, it can be difficult to get the HINSTANCE, indeed, I'm using pySDL2 (Python) and I can only access properties that SDL2 gives me.
I have to use a dirty trick like that to get the HINSTANCE:  (https://raw.githubusercontent.com/bglgwyng/pyVulkan/master/examples/win32misc.py)
2016-11-20 21:18:55 -08:00
Sam Lantinga
438241a969 Expose the EGL display and window for Vivante SDL windows 2016-01-16 21:58:49 -08:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Alex Szpakowski
d81533aeed Added MSAA support for OpenGL ES contexts on iOS.
Note that extra steps must be taken when using glReadPixels to read the contents of the main OpenGL ES framebuffer on iOS, if multisampling is used. See the OpenGL ES section of README-ios.md for details.
2015-07-19 19:44:40 -03:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Alex Szpakowski
db53123ea2 Fixed a warning when SDL_syswm.h is included in code compiled for iOS with clang. 2015-05-05 16:24:05 -03:00
Alex Szpakowski
58fb5ed781 Added framebuffer and colorbuffer members to the uikit portion of the SDL_SysWMinfo struct, removed SDL_iOSGetViewRenderbuffer and SDL_iOSGetViewFramebuffer.
--HG--
branch : iOS-improvements
2015-04-09 19:28:00 -03:00
Ryan C. Gordon
a0881fff00 Windows: Report window HDC in SDL_SysWMinfo.
Fixes Bugzilla #2668.

--HG--
extra : rebase_source : d45a1a2af2c6e79d4b778383dd88a6a994c3e81a
2015-03-23 19:47:08 -04:00
Jørgen P. Tjernø
74e2ea85ee Mac: Fix build with clang from Xcode 6. 2014-09-30 11:20:50 -07:00
Sam Lantinga
13c9e77b67 Better check for __has_feature 2014-08-19 22:04:54 -07:00
Sam Lantinga
4d4e7b1085 Fixed bug 2694 - configure bug __has_feature macro not detected
skaller

using gcc 4.2 (the default) on Mac OSX 10.6.8

 CC     build/SDL_dynapi.lo
In file included from /Users/johnskaller/SDL/src/dynapi/SDL_dynapi.c:31:
include/SDL_syswm.h:211:39: error: missing binary operator before token "("

The fault appears to be here:

#if defined(__OBJC__) && __has_feature(objc_arc)

that the __has_feature macro is not supported by gcc 4.2.

The code works fine with my clang 3.3svn.
2014-08-19 21:17:21 -07:00
Ryan C. Gordon
7f5f9af5ab Make SDL_SysWMinfo usable on Mac/iOS with ARC enabled (thanks, Alex!).
Fixes Bugzilla #2641.
2014-07-30 14:14:19 -04:00
Jørgen P. Tjernø
5844991980 Apply WIN32_LEAN_AND_MEAN redefine fix to SDL_syswm.h too.
This is related to 7a261af2d612, which fixes bug 2508.
2014-06-30 17:22:08 -07:00
Jørgen P. Tjernø
3b1c45d421 SDL_opengl: Fix Mac build for SDK 10.9 too. 2014-06-04 10:33:23 -07:00
Sam Lantinga
e50052e494 Added a way to get the native Android window and EGL context 2014-06-02 09:01:26 -07:00
Ryan C. Gordon
f2f5660c94 Removed comma at end of enum in a public header, to make -Wpedantic happy. 2014-04-29 12:00:28 -04:00
Brandon Schaefer
2b16b7f620 Revert MIR_CFLAGS to SDL_CFLAGS. Use forward declaration for the real fix. (We shouldn't expose mir headers!) 2014-04-21 12:42:25 -07:00
Sam Lantinga
3af0136604 Fixed binary compatibility with the new Windows RT support 2014-03-10 19:11:52 -07:00
Sam Lantinga
a7d2ebb8d6 Integrated David Ludwig's support for Windows RT 2014-03-09 11:36:47 -07:00
Ryan C. Gordon
e242c2f9f4 Added some SysWM bits for Mir.
--HG--
extra : rebase_source : e02d7f813f5b5a5af2a546c29af91ed16e038752
extra : histedit_source : 0f7c419f2002c176606b30e87f94049287bf3aac
2014-02-02 23:53:48 -05:00
Ryan C. Gordon
adb4d0965e Added Mir video target (thanks, Brandon!).
--HG--
extra : rebase_source : 9564f37024fe0ffe8139803eeb198c9a1fd142d9
extra : histedit_source : 872a8f12b9891854366f6932c7240fca7c2fad9a%2Ca3feb8654d46fbe0caeea33ccbc90e4b457dbc11
2014-02-02 23:41:46 -05:00
Sam Lantinga
d7940a513e Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Gabriel Jacobo
69734c6913 Preserve binary compatibility in SDL_SYSWM_TYPE (thanks Gerry JJ!)
Also moved Wayland structures to the bottom of the union for OCD related issues.
2014-01-28 09:13:46 -03:00
Gabriel Jacobo
3308d271b5 Wayland support
Based on the original port to Wayland by: Joel Teichroeb, Benjamin Franzke, Scott Moreau, et al.

Additional changes in this commit, done by me:

* Wayland uses the common EGL framework
* EGL can now create a desktop OpenGL context
* testgl2 loads GL functions dynamically, no need to link to libGL anymore
* Assorted fixes to the Wayland backend

Tested on the Weston Compositor (v1.0.5) that ships with Ubuntu 13.10,
running Weston under X. Tests ran: testrendercopyex (all backends), testgl2, testgles2,testintersections
2013-12-14 20:18:43 -03:00
David Ludwig
95727847d7 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
76880e2b8b WinRT: more "Windows RT" to "WinRT" renaming 2013-08-27 12:20:35 -04:00
David Ludwig
45a13dac17 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
88461d442a WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45)
--HG--
rename : README.iOS => README-ios.txt
2013-08-12 22:29:55 -04:00
Sam Lantinga
c43e19485b Fixed code example for SDL_GetWindowWMInfo() 2013-07-14 11:57:01 -07:00
Sam Lantinga
5a85d1d29a This patch isn't needed because you have the window and can do [nswindow contentView] yourself.
I'm rolling this back so we minimize the things exposed that we have to keep consistent in the API.
2013-06-05 21:31:22 -07:00
Sam Lantinga
97fba74bda Fixed bug 731 - No mechanism to extract the NSView for 3d library 2013-05-20 22:05:49 -07:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
David Ludwig
52a3b9b1f5 WinRT: made SDL's inner WinRT CoreWindow be accessible to non-C++/CX code, in theory 2013-04-16 23:40:03 -04:00
David Ludwig
776ebe3bda WinRT: merged with latest, official, SDL 2.x code 2013-02-23 20:01:46 -05:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
David Ludwig
4b6b1755fe WinRT: provided access, via SDL_GetWindowWMInfo, to SDL's WinRT CoreWindow 2013-02-09 14:35:06 -05:00
David Ludwig
fb4a889ee9 added UIViewController pointer to SDL_SysWMinfo for iOS 2012-07-18 22:26:47 -04:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00