Commit Graph

6467 Commits

Author SHA1 Message Date
Ryan C. Gordon 06f6a59212 Corrected Haiku build. 2013-08-20 20:16:15 -04:00
Ryan C. Gordon c9152adcb0 Patched new filesystem code to compile. 2013-08-20 20:15:15 -04: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 6344736696 Fixed cut-and-paste error. 2013-08-20 15:28:14 -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 63fe3a7753 Fixes a few non C89 compliant comments 2013-08-20 19:49:24 -03:00
Edward Rudd d8f66188d1 add missing SDL_bits.h from OS X framework
- also add in headers to static and shared targets  (for completeness)
2013-08-20 15:56:08 -04:00
Ryan C. Gordon e43ff8fb59 Added some FIXMEs for later. 2013-08-20 12:43:06 -04:00
Gabriel Jacobo 0eeb76d869 Fixes bug #2037, common EGL code for Android and X11 2013-08-19 16:29:46 -03:00
Ryan C. Gordon b44267693d Fixed leaking of pixel shader object in D3D renderer (thanks, Peter!).
Fixes Bugzilla #2047.
2013-08-19 11:02:44 -04:00
Sam Lantinga 0ca506611c Fixed warnings building with gcc 2 and gcc 4 on Haiku 2013-08-18 23:18:11 -07:00
Sam Lantinga c2a29aede9 Fixed Haiku build (thanks Alexander!) 2013-08-18 22:05:53 -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
Ryan C. Gordon 7e3b7dbcb6 Patched to compile with Visual Studio. 2013-08-17 20:46:34 -04:00
Sam Lantinga 1455a94714 Fixed Windows build 2013-08-17 17:14:15 -07:00
Sam Lantinga d7817f424b Fixed for consistency with the other platforms 2013-08-17 17:04:14 -07:00
Edward Rudd e187810eca auto init the ticks if the GetTicks and the like methods are called before SDL_Init().. This prevents annoying game bugs such as caching SDL_GetPerformanceFrequency in a static initializer 2013-08-17 18:07:29 -04:00
Sam Lantinga 6995ff18d3 Do full state initialization in D3D_Reset(), this fixes blend mode issues when resizing the window on Windows 8. 2013-08-17 09:54:30 -07:00
Sam Lantinga 9ab14aa554 Fixed windows build 2013-08-16 17:50:44 -07:00
Sam Lantinga ff77ca8d0b The keyboard text events should be sent after the key down events 2013-08-16 15:38:06 -07:00
Sam Lantinga b4b12d950e Fixed bug 1876 - SDL_TEXTINPUT only returns '?' (0x3F) in event.text.text with Khmer language input
Andreas

The issue comes down to this line on MSDN:
"TranslateMessage produces WM_CHAR messages only for keys that are mapped to ASCII characters by the keyboard driver."

"WM_KEYDOWN and WM_KEYUP combinations produce a WM_CHAR or WM_DEADCHAR message. WM_SYSKEYDOWN and WM_SYSKEYUP combinations produce a WM_SYSCHAR or WM_SYSDEADCHAR message."
Except for WM_CHAR, none of these messages are used in SDL. Hence TranslateMessage should be dropped entirely and proper handling be included in the WM_KEYDOWN event.
Currently TranslateMessage is called for every message even if it must not be called in certain cases (like "An application should not call TranslateMessage if the TranslateAccelerator function returns a nonzero value.").

WM_CHAR message handling should remain for external processes posting these messages - additionally, WM_UNICHAR should be added.

I made a patch for src/video/windows/SDL_windowsevents.c that seems to work fine. It doesn't solve the "missing" composition for Khmer, but at least input for languages that cannot be mapped to ASCII characters (and for which IME is not used) will now work on Windows.
2013-08-16 15:35:10 -07:00
Gabriel Jacobo bb2671b7e7 Android quirk:Some devices don't report GL_OES_framebuffer_object but support it 2013-08-16 14:38:04 -03:00
Ryan C. Gordon 4cb0ead795 Patched to compile. 2013-08-16 12:51:29 -04:00
Gabriel Jacobo 02868b6903 [Bug 2042] OpenGL ES renderer tries to load OES functions unconditionally
Also, fail more gracefully when creating texture to avoid double free errors.
2013-08-16 13:37:27 -03:00
Sam Lantinga 76b7b1e96c Fixed alpha composition when destination alpha is transparent.
Jianyu Guan

I found I make a big mistake that when dstA==0, I just simply let *dstp=*srcp and forgot to make dstRGB = srcRGB*srcA.

The if consition "(*dstp & amask) == 0" in BlitRGBtoRGBPixelAlphaMMX and BlitRGBtoRGBPixelAlphaMMX3dNow should be removed.
2013-08-16 09:20:33 -07:00
Sam Lantinga 89bc80f1ae Fixed alpha blending for the MMX blit functions
I see the Remarks of function SDL_BlitSurface shows that "when SDL_BLENDMODE_BLEND, we have dstA = srcA + (dstA * (1-srcA))". however, I tested some pictures but the result implies "dstA=arcA" actually. I stepped into the source code, and found after I set SDL_BLENDMODE_BLEND for the source surface, the final blit function is BlitRGBtoRGBPixelAlphaMMX when I use SDL_BlitSurface on my computer. And I found these codes:

    else if (alpha == amask) {
    /* opaque alpha -- copy RGB, keep dst alpha */
    *dstp = (*srcp & chanmask) | (*dstp & ~chanmask);

The same code is used in BlitRGBtoRGBPixelAlphaMMX3DNOW and BlitRGBtoRGBPixelAlpha. So I think they still keep dst alpha.

Best regards,
Jianyu Guan
2013-08-16 06:59:19 -07:00
Andreas Schiffler 65728477af Fix bug 2034: replace printf by SDL_Log in tests; update loopwave VS solution: copy missing dependency 2013-08-14 23:30:10 -07:00
Sam Lantinga 67367be019 Don't print "unrecognized key" message for an X11 keycode of 0. This can happen with composed characters. 2013-08-12 22:00:21 -07:00
Sam Lantinga 5d1865c245 Fixed the tag name for the SDL 2.0 release 2013-08-12 19:18:48 -07:00
J?rgen P. Tjern? 14bf230d76 Mac: Fix restoring of Cmd-H-hidden fullscreen desktop windows.
This should fix http://bugzilla.libsdl.org/show_bug.cgi?id=1996
2013-08-12 11:09:13 -07:00
Sam Lantinga a84a97fe85 Added Julian Winter to the credits for the SDL 2.0 website. 2013-08-12 08:45:37 -07:00
Sam Lantinga 03477ef6e3 Added tag release_2.0.0 for changeset d4ce48ff30d1 2013-08-12 08:40:49 -07: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
Sam Lantinga e14e0ef947 Fixed crash if the OpenGL library hasn't been loaded yet 1970-01-01 04:04:21 +00:00
Yuri Kunde Schlesner d12d7952f1 Align pointer in SDL_memset before doing Uint32 loop
Some more recent compilers emit SSE aligned store instructions for the loop,
causing crashes if the destination buffer isn't aligned on a 32-bit boundary.
This would also crash on platforms like ARM that require aligned stores.

This fixes a crash inside SDL_FillRect that happens with the official x64 mingw
build.
2014-05-10 21:48:46 -03:00
Philipp Wiesemann 9bc47465ca Changed C++ style comments. 2014-05-18 21:11:30 +02:00
Philipp Wiesemann f5c77149bf Fixed typo in header comment. 2014-05-18 21:05:39 +02:00
Philipp Wiesemann ca11d7c8b5 Changed C++ style comments to fix pedantic warnings. 2014-05-17 22:02:25 +02:00
Philipp Wiesemann 0d196c3099 Removed unused standard library includes from gesture source. 2014-05-17 21:52:05 +02:00
Gabriel Jacobo 660a57f906 Fixes #2541, build failure with Wayland enabled, OpenGL ES disabled
Also includes an attempt at fixing building SDL on Ubuntu 13.10, which hopefully
won't break 14.04
2014-05-13 19:42:40 -03:00
Sam Lantinga e772f0df2b Added a binding for the NVIDIA Shield controller 2014-05-13 12:10:37 -07:00
Sam Lantinga 6735097332 Updated coding style to match the rest of SDL 2014-05-13 11:32:36 -07:00
Philipp Wiesemann 81c574b8cb Fixed typo in header comment. 2014-05-11 15:59:22 +02:00
David Ludwig 49cef77e31 WinRT: fixed the max-button count for WinPhone 8.1 message boxes
Doh.

The max button count on WinPhone 8.1 was set to three, not two.  Any more than
two leads to a crash.
2014-05-10 23:39:54 -04:00
David Ludwig ea99e0c03e Added limited message-box support for Windows Phone 8.1
The Windows Phone 8.1 'MessageDialog' API only seems to support two buttons,
despite the documentation for such mentioning support for three.  Trying to use
three or more buttons leads to an exception being thrown.  As such, any attempt
to use more than two buttons via SDL_ShowMessageBox (on Windows Phone 8.1) will
lead to no message box getting shown, and the call returning an error.

The Win32 MessageBox and dialog APIs are not available in WinRT apps, to note.

More extensive message dialog support might be available at some point, if and
when XAML support is more fully fleshed-out.  I'm not certain of this, though.
2014-05-10 23:28:53 -04:00
Gabriel Jacobo d5a2e55d48 Improve handling of focus behaviour on Android. Patch by Alexey Petruchik 2014-05-10 18:24:39 -03:00