Sam Lantinga
7ad2673395
Fixed bug 2687 - SDL_BlitScaled does not handle clipping correctly
...
Patch from Benoit Pierre:
video: fix clipping handling in SDL_UpperBlitScaled
- honor destination clipping rectangle
- update both destination and source rectangles when clipping source
rectangle to source surface and destination rectangle to destination
clip rectangle
- don't change scaling factors when clipping
N.B.:
- when no scaling is involved (source and destination width/height are
the same), SDL_UpperBlit is used (so SDL_BlitScaled behaves like
SDL_BlitSurface)
- the final destination rectangle after all clipping is performed is
saved back to dstrect (like for SDL_UpperBlit)
2014-08-16 23:25:02 -07:00
Sam Lantinga
5acb7c63d1
Added SDL_round(), contributed by Benoit Pierre - thanks!
2014-08-16 23:23:15 -07:00
Sam Lantinga
5619521805
Fixed bugs 2677 and 2625, made it possible to lock render targets in D3D
2014-08-16 23:17:47 -07:00
Sam Lantinga
2afb7573b6
Fixed building on Windows with CMake
2014-08-16 15:18:21 -07:00
Ryan C. Gordon
6ee688f85c
Haptic: Add some missing haptic types to test, and fix wrong array-sizes.
...
Thanks, Elias!
Fixes Bugzilla #2686 .
(along with the last several commits.)
2014-08-16 16:50:10 -04:00
Ryan C. Gordon
ea687875b0
Haptic: Fix clamping bugs on Windows, by using the Darwin haptics code.
...
Thanks, Elias!
Partially fixes Bugzilla #2686 .
2014-08-16 16:49:00 -04:00
Ryan C. Gordon
640631c6dc
Haptic: Fix the saturation and deadband parameters' available range.
...
There was a misconception that Linux's saturation and deadband parameters -
on which the corresponding SDL parameters were based - use only half of the
possible range.
Thanks, Elias!
Partially fixes Bugzilla #2686 .
2014-08-16 16:47:42 -04:00
Ryan C. Gordon
f703b1b22c
Haptic: Explicitly avoid floating point arithmetic if it's not needed.
...
Thanks, Elias!
Partially fixes Bugzilla #2686 .
2014-08-16 16:42:55 -04:00
Ryan C. Gordon
b9be113196
Haptic: DInput's POLAR direction actually matches Linux's direction.
...
Thanks, Elias!
Partially fixes Bugzilla #2686 .
--HG--
extra : histedit_source : 214ecbc7baaf28e6c7ff1eee687ee66f356446eb
2014-08-16 16:41:25 -04:00
Ryan C. Gordon
a5d019efa3
Haptic: Don't interpret a direction of polar 35999 as "unsupported type".
...
(or linux-direction 0xFFFF)
Thanks, Elias!
Partially fixes Bugzilla #2686 .
--HG--
extra : histedit_source : 767fa48d79fe8dfe8dda1f155ff1e19a470d7efc
2014-08-16 16:40:01 -04:00
Philipp Wiesemann
178a30b438
Fixed markdown formatting in READMEs.
2014-08-15 23:39:14 +02:00
Philipp Wiesemann
bb534092c1
Updated README.
2014-08-15 23:18:57 +02:00
Philipp Wiesemann
32dfd062cb
Fixed enumeration in README.
2014-08-15 23:13:51 +02:00
Sam Lantinga
bafc5ef326
Take advantage of GL_ARB_texture_non_power_of_two when it's available
2014-08-14 21:31:50 -07:00
Philipp Wiesemann
d0d7ebee0f
Fixed warnings about unused local variables.
2014-08-12 23:37:12 +02:00
Philipp Wiesemann
69487c41dd
Fixed warning about implicit boxing to Java Object.
2014-08-12 23:33:16 +02:00
Philipp Wiesemann
b75c6e2eb2
Fixed doxygen warnings and markdown formatting.
2014-08-12 23:28:45 +02:00
Sam Lantinga
c1d6f15368
Implemented SDL_GetPrefPath() on Android - it returns the path used by SDL_AndroidGetInternalStoragePath()
2014-08-11 17:25:53 -07:00
Sam Lantinga
05e40eb04a
Added an entry for the new Steam controller XInput emulation mode
2014-08-11 17:24:54 -07:00
Philipp Wiesemann
33e7cc6d8d
Fixed typo in source comment.
2014-08-11 23:18:35 +02:00
Philipp Wiesemann
36341cbc34
Added javadoc comment for consistency.
2014-08-11 23:16:47 +02:00
Philipp Wiesemann
35ea23dbc4
Fixed doxygen warning and markdown formatting.
2014-08-11 23:13:20 +02:00
Philipp Wiesemann
1a726f39d2
Updated README name in header.
2014-08-11 22:53:03 +02:00
Philipp Wiesemann
270b8d0d52
Removed 42 from README.
2014-08-11 22:45:08 +02:00
David Ludwig
587dd65dec
WinRT build fix for ARM platforms
...
The _xgetbv intrinsic was being used in ARM builds of SDL/WinRT, which was
leading to linker errors. This commit limits _xgetbv use to the platforms on
which it is available, x86 and x64.
2014-08-10 22:21:21 -04:00
Sam Lantinga
c7790bdb2b
Added NV12 and NV21 texture support for OpenGL and OpenGL ES 2.0 renderers
2014-08-06 11:34:54 -07:00
Sam Lantinga
298925e01f
The OpenGL context returned by the UIKit backend is now an actual OpenGL context instead of the OpenGL view we created.
...
This allows you to use the returned context in functions like CVOpenGLESTextureCacheCreate()
2014-08-06 00:28:02 -07:00
Sam Lantinga
b85f8a9917
Haptics aren't available on iOS, but use the dummy implementation instead of failing init if it's requested.
2014-08-05 21:03:02 -07:00
Alfred Reynolds
3e9232ec06
SDL - when raising the window under OSX also force the app to activate. This fixes a fullscreen window on a separate space not coming front when raisewindow is called.
2014-07-31 12:46:23 -07:00
Alfred Reynolds
194112d3fe
SDL - fix re-entrancy into SDL_UpdateFullscreenMode under OSX. During HideWindow we get a RESTORED event which then turns fullscreen back on causing a hang in Cocoa_SetWindowFullscreenSpace waiting for the fullscreen transition to finish.
2014-07-30 17:45:52 -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
Ryan C. Gordon
b8e90cf635
Fixed comment typo.
2014-07-30 14:12:54 -04:00
Ryan C. Gordon
1c826fa22c
SDL_GetQueuedAudioSize() shouldn't grab lock when not set up for queueing.
2014-07-30 11:11:48 -04:00
Ryan C. Gordon
5a25e7950c
Added a GetPendingBytes method to the audio backend.
...
This will (eventually) make SDL_GetQueuedAudioSize() more accurate, and thus
reduce latency. Right now this isn't implemented anywhere, so we assume data
fed to the audio callback is consumed by the hardware and immediately played
to completion.
2014-07-30 11:08:31 -04:00
Ryan C. Gordon
f4f2649e6a
XAudio2: Use XAUDIO2_VOICE_NOSAMPLESPLAYED when possible.
...
For versions of XAudio2 with an IXAudio2SourceVoice::GetState() that offers a
flags parameter, we can use XAUDIO2_VOICE_NOSAMPLESPLAYED, since we don't
need this information in our current calls. According to MSDN, this makes the
the call about 3x faster.
2014-07-30 09:54:01 -04:00
Sam Lantinga
91bbc7d9fa
Moved documentation to docs, recreated a simple README.txt, fixed build
...
--HG--
rename : doc/README-SDL.md => README-SDL.txt
rename : doc/README-android.md => docs/README-android.md
rename : doc/README-cmake.md => docs/README-cmake.md
rename : doc/README-directfb.md => docs/README-directfb.md
rename : doc/README-dynapi.md => docs/README-dynapi.md
rename : doc/README-gesture.md => docs/README-gesture.md
rename : doc/README-hg.md => docs/README-hg.md
rename : doc/README-ios.md => docs/README-ios.md
rename : doc/README-linux.md => docs/README-linux.md
rename : doc/README-macosx.md => docs/README-macosx.md
rename : doc/README-nacl.md => docs/README-nacl.md
rename : doc/README-pandora.md => docs/README-pandora.md
rename : doc/README-platforms.md => docs/README-platforms.md
rename : doc/README-porting.md => docs/README-porting.md
rename : doc/README-psp.md => docs/README-psp.md
rename : doc/README-raspberrypi.md => docs/README-raspberrypi.md
rename : doc/README-touch.md => docs/README-touch.md
rename : doc/README-wince.md => docs/README-wince.md
rename : doc/README-windows.md => docs/README-windows.md
rename : doc/README-winrt.md => docs/README-winrt.md
rename : doc/README.md => docs/README.md
rename : doc/doxyfile => docs/doxyfile
2014-07-29 08:04:15 -07:00
Gabriel Jacobo
9509486801
Rearrange documentation
...
1) Moves all READMEs to docs/
2) Renames them to *.md, adds some Markdown with the idea to add a lot more
3) Moves the doxyfile config to doc/ and makes it parse the headers at ../include as well as the md files in docs.
4) Skips SDL_opengl*.h headers from the docs
5) Minor fixes to doxyfile
2014-07-29 09:20:12 -03:00
Ryan C. Gordon
d9bf955208
Changed local var names in SDL assert macro.
...
Otherwise, if someone added an assert to a function that has a variable
named "state", the compiler might warn about shadowing a local.
2014-07-28 10:54:25 -04:00
Sam Lantinga
c43be6965f
Turned on OmitDefaultLibName for SDL, SDLmain and SDLtest
2014-07-27 19:56:53 -07:00
Ryan C. Gordon
74ff58fdaf
Remove dependency on C runtime from Windows SDLmain.
2014-07-27 19:52:52 -04:00
Sam Lantinga
2fd74d97af
Fixed bug 2537 - _allmul in SDL_lib.c is not working properly
2014-07-27 17:44:10 -07:00
Sam Lantinga
8d41429a9b
Fixed uninitialized variable in some cases
2014-07-27 17:43:36 -07:00
Ryan C. Gordon
a261470598
Added audio device buffer queueing API.
...
--HG--
extra : rebase_source : a454256d88e413a4898b5005472625f755abfad4
2014-07-22 21:41:49 -04:00
Sam Lantinga
cb2cf20706
Fixed bug 2657 - Memory leak in GL_CreateTexture function
...
Nitz
In GL_CreateTexture function:
if (GL_CheckError("glGenTexures()", renderer) < 0) {
SDL_free(data);
return -1;
}
Here only data is getting free but data->pixels getting leak.
So have to free data->pixels before free data.
2014-07-26 16:52:26 -07:00
Ryan C. Gordon
7f5d524dca
Clarifying hard-to-understand piece of code.
...
--HG--
extra : histedit_source : c70605fa116a69214f22cb1352939b1ec67287c8
2014-07-22 23:12:21 -04:00
Brandon Schaefer
07dc19edb1
Dont redeclare DBusMessage* msg;
2014-07-18 14:10:45 -07:00
Sam Lantinga
023d1d048c
Fixed bug 2640 - Unable to SDL_SetRenderTarget to original surface for software renderer without a window
...
Damian Kaczmarek
Basically this bug is probably not a common use case. My goal is to allow rendering totally without a window, for example to a screenshot and I need to rely on SDL_SetRenderTarget to properly work for a purely software renderer created by SDL_CreateSoftwareRenderer.
2014-07-13 09:04:55 -07:00
Sam Lantinga
0e78b5780a
Fixed bug 2639 - SDL_BLENDMODE_BLEND not working properly for software renderer, thanks to Melker Narikka
2014-07-12 16:21:56 -07:00
Sam Lantinga
34390a84d0
Fixed bug 2638 - (Signed) Can't create signed apps in Android
...
Pablo Mayobre
When generating a signed app with SDL 2.0.3 an issue comes up, watching at the Error Log points out that the issue lies in the src/main/android/SDL_android_main.c where the process name is defined as "SDL_app", this name turns into an erroneous name so it should be changed to "app_process"
2014-07-12 13:05:41 -07:00
Sam Lantinga
e69eb33a5e
Fixed Visual Studio 2010 build
2014-07-11 22:15:34 -07:00