Commit Graph

512 Commits

Author SHA1 Message Date
Sam Lantinga
08fa8da77c Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings
Andreas Ertelt

The problem in question is caused by changeset 7771 (http://hg.libsdl.org/SDL/rev/5486e579872e / https://bugzilla.libsdl.org/show_bug.cgi?id=2121)

The redefinition of __inline__ (introduced by the addition of begin_code.h:128's "|| __STRICT_ANSI__") results in mingw's gcc throwing multiple

   warning: always_inline function might not be inlinable [-Wattributes]

as well as a whole bunch of redefinitions of mingw internals which break linking of projects including the SDL2 headers.
2013-10-20 21:56:15 -07:00
Sam Lantinga
f5fa492e26 Added a macro SDL_TICKS_PASSED() to correctly compare two 32-bit tick values.
Went through the code and used the macro and fixed a couple places that were using incorrect timestamp comparisons.
2013-10-20 20:42:55 -07:00
Sam Lantinga
04e170ceb7 Added __WINDOWS__ to reflect both 32 and 64-bit windows platforms 2013-10-20 20:41:30 -07:00
Ryan C. Gordon
0e699eb5bb Added SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (thanks, David!).
Fixes Bugzilla #1985.
2013-10-20 21:18:05 -04:00
Sam Lantinga
8b79cbadef Added an API to get the amount of system RAM 2013-10-17 11:32:56 -07:00
Sam Lantinga
080c919b79 Fixed function feature test for Visual Studio 2012
norfanin

Fixes the version check for some functions that are only present with the MSVC 2013 CRT libraries.

I did my testing wrong and failed to see that 2012 doesn't have these functions. Microsoft implemented them in their upcoming 2013 version, though. The attached patch changes it to the check for the next version.

I also removed the HAVE_ITOA because that would require linking with oldnames.lib and it's easier to just let the SDL implementation take over.
2013-10-13 19:51:58 -07:00
Sam Lantinga
a7e1fdddea Updated SDL to version 2.0.1 2013-10-10 21:50:25 -07:00
Gabriel Jacobo
89131435f8 Adds gl_profile_mask to test framework, uses it in testgles 2013-10-10 00:49:57 -03:00
Gabriel Jacobo
b39a4daf04 SDL_TEXTINPUT support for EVDEV 2013-10-03 10:28:10 -03: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
f3bd9175a9 WinRT: more renaming of "windowsrt" to "winrt" 2013-09-04 19:55:45 -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
1e78c4a5d1 WinRT: more "Windows RT" to "WinRT" renaming 2013-08-27 12:20:35 -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
3dde6e1e9f WinRT: made sure SDL_main gets used in the latest SDL 2.0.0 based code 2013-08-13 20:28:10 -04:00
David Ludwig
d41fdc94d6 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
David Ludwig
f7049b93d5 WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d4ce48ff30d1) 2013-08-12 22:29:55 -04:00
Sam Lantinga
1ad936eb29 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow()
Rainer Deyke

I'm running Linux Mint 15 with the Cinnamon window manager.  SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
2013-08-11 19:56:43 -07:00
Sam Lantinga
69a4351eb0 Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi 2013-09-30 22:35:32 -07:00
Sam Lantinga
058aba086c Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42 2013-09-30 21:57:03 -07:00
Sam Lantinga
202528a48f Call AddRef() on the device so it doesn't accidentally get released from underneath the caller. 2013-09-28 14:07:17 -07:00
Sam Lantinga
25f607a3c2 Make it clear we're just returning a D3D9 device, allowing for new functions to get other D3D versions 2013-09-28 14:07:14 -07:00
Sam Lantinga
cf5e5a8360 Added a hint to create the D3D device in thread-safe mode: SDL_HINT_RENDER_DIRECT3D_THREADSAFE 2013-09-28 14:07:08 -07:00
Sam Lantinga
803965bcc2 Added platform specific call: SDL_RenderGetD3DDevice() 2013-09-28 14:07:05 -07:00
Sam Lantinga
57bd514707 Added optimized YUV texture upload path with SDL_UpdateYUVTexture() 2013-09-28 14:06:47 -07:00
Sam Lantinga
99789c71c1 Fixed bug 1820 - building SDL as a static library with static runtime doesn't compile/link with visual studio
norfanin

Adds a condition so only the MSVC 2012 compiler defines the macros for the functions of its version.

Attaching a patch that adds a condition so that the HAVE_X supported by MSVC 2012 only get defined with that compiler. MSVC 2008 and 2010 will then build without any modification to the SDL source code.

Also moved HAVE_M_PI to a separate check. The Microsoft headers require _USE_MATH_DEFINES to be defined before they define the constants.
2013-09-28 10:30:51 -07:00
Gabriel Jacobo
9ceed73db4 Raspberry Pi support (also unified UDEV and EVDEV support) 2013-09-28 13:28:19 -03:00
Philipp Wiesemann
b9a2230806 Fixed doxygen warning. 2013-09-28 12:55:32 +02:00
Sam Lantinga
3ef5a97706 Fixed the name of the environment variable to match the name of the hint. 2013-09-27 23:19:22 -07:00
Edward Rudd
869a707612 add in High DPI support (aka Retina)
- based on J?rgen's patch with a few bug fixes
2013-09-20 13:43:00 -04:00
Sam Lantinga
fae4190dca Added SDL_Direct3D9GetAdapterIndex(), which returns the adapter index you would pass into CreateDevice to get your device on the right monitor in full screen mode. This fixes the default adapter in SDL_render_d3d.c, which means that tests will work fullscreen off the main monitor now.
CR: Sam
2013-09-13 17:42:46 -07:00
Ryan C. Gordon
5081b5d3da Workaround for compiling with /W4 warnings on Visual C++. 2013-09-07 13:57:20 -04:00
Sam Lantinga
2afbd773b8 Fixed bug 2081 - Add name to SDL_Point structure
Dmitry Marakasov

Unlike SDL_Rect (typedef struct SDL_Rect {} SDL_Rect), SDL_Point (typedef struct {} SDL_Point) structure is unnamed. This feels inconsistent and makes it impossible to use forward declaration for SDL_Point, having to include whole SDL_rect.h instead.
2013-09-05 07:02:27 -07:00
Ryan C. Gordon
b63d11ce9c The SDL_PixelFormat* passed to SDL_ConvertSurface() should be const. 2013-09-04 23:40:11 -04:00
Edward Rudd
5f45f4224f make the examples in the doc comments match the actual output of the SDL_GetPrefPath function 2013-08-24 09:43:14 -04:00
Gabriel Jacobo
1c6d55767c Separate EGL / GL ES detection in CMake 2013-08-22 14:56:07 -03:00
Ryan C. Gordon
f77c2372e0 Added SDL_VIDEO_OPENGL_ES2 to the SDL_config.h templates (Thanks, Kerim!). 2013-08-22 13:00:05 -04:00
Gabriel Jacobo
1e49b1ed6e OCD fixes: Adds a space after /* (glory to regular expressions!) 2013-08-21 09:47:10 -03:00
Gabriel Jacobo
695344d163 OCD fixes: Adds a space before */ 2013-08-21 09:43:09 -03:00
Ryan C. Gordon
2dd7091e50 Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module. 2013-08-20 19:57:11 -04:00
Ryan C. Gordon
abbaa90dd6 Added SDL_DEPRECATED #define. 2013-08-20 14:21:35 -04:00
Ryan C. Gordon
094a72b8f7 Added SDL_assert_always (never disabled). 2013-08-20 14:17:48 -04:00
Gabriel Jacobo
552b04c58a More non C89 compliant comments 2013-08-20 20:34:40 -03:00
Gabriel Jacobo
0eeb76d869 Fixes bug #2037, common EGL code for Android and X11 2013-08-19 16:29:46 -03:00
Sam Lantinga
0ca506611c Fixed warnings building with gcc 2 and gcc 4 on Haiku 2013-08-18 23:18:11 -07:00
Philipp Wiesemann
a46437f798 Replaced introduction in header file with more recent version from README.txt. 2013-08-18 11:15:30 +02:00
Philipp Wiesemann
ad608e2dc3 Corrected file names in header file comments. 2013-08-18 11:12:46 +02:00
Philipp Wiesemann
8cf730554b Changed some documentation comments in header files to be used by doxygen. 2013-08-18 11:08:52 +02:00
Gabriel Jacobo
dad420670f Fixes #2022, do not resume on Android when surfaceChanged
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.

Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
2013-08-12 11:13:50 -03:00
Philipp Wiesemann
f5c77149bf Fixed typo in header comment. 2014-05-18 21:05:39 +02:00
Philipp Wiesemann
81c574b8cb Fixed typo in header comment. 2014-05-11 15:59:22 +02:00
Gabriel Jacobo
b701175ab5 Include gl2platform.h in SDL_opengles2.h so we play nice with GLEW.
Based on feedback from Sven Bergstr?m
2014-05-10 17:00:37 -03:00
Dimitris Zenios
548a0ee7b8 __ANDROID__ is the correct macro to check for an android system.ANDROID is only defined in NDK build system (.mk) and not in the standalone NDK. 2014-05-05 22:21:26 +03:00
Ryan C. Gordon
2a7aa9bde8 Fix build on Windows targets without dxgi.h, like MingW32. 2014-05-06 00:13:07 -04:00
Ryan C. Gordon
cb403ab660 Removed comma at end of enum in a public header, to make -Wpedantic happy. 2014-04-29 12:00:28 -04:00
Sam Lantinga
bd6a493697 Fixed bug 2508 - don't redefine WIN32_LEAN_AND_MEAN 2014-04-26 12:38:35 -07:00
Brandon Schaefer
ae2a50fc8f 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
J?rgen P. Tjern?
defd90b6f6 Render: Allow empty cliprect.
This fixes an issue where an empty cliprect is treated the same as a NULL
cliprect, causing the render backends to disable clipping.

Also adds a new API, SDL_RenderIsClipEnabled(render) that allows you to
differentiate between:
 - SDL_RenderSetClipRect(render, NULL)
 - SDL_Rect r = {0,0,0,0}; SDL_RenderSetClipRect(render, &r);

Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2504
2014-04-19 13:15:41 -07:00
Sam Lantinga
03afd0de40 SDL_DXGIGetOutputInfo() checks input parameters and returns a boolean value whether or not it succeeded. 2014-04-18 12:43:04 -07:00
Dimitris Zenios
9eccde51c3 Enable building of Android libraries using a standalone NDK 2014-04-06 00:30:48 +03:00
David Ludwig
3dcb451f85 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.
2014-04-09 21:29:19 -04:00