Commit graph

43 commits

Author SHA1 Message Date
Sam Lantinga
d7940a513e Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon
82edee6971 Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.

--HG--
extra : rebase_source : ddf4a4c0dc2c554b98c82700798f343cd91b16e3
2013-11-24 23:56:17 -05:00
Sam Lantinga
08dfaaa2e6 Christoph Mallon: Remove pointless if (x) before SDL_free(x) 2013-08-29 08:29:21 -07:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Philipp Wiesemann
aa0aeac03c Fixed bug 1845 - SDL_GetNumTouchDevices() has incorrect prototype
nfxjfg

SDL_touch.h:63:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]

Is:

extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices();

Should be:

extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
2013-05-12 13:42:20 +02:00
Ryan C. Gordon
4f438b70a2 Make SDL_SetError and friends unconditionally return -1.
This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
2013-03-31 12:48:50 -04:00
Sam Lantinga
bb0752e573 Updated touch API
* Normalized touch coordinates as floats in the 0...1 range
* Removed unused touchpad concepts from the API
* Added API functions to get active touch devices and current finger state
2013-03-03 01:01:33 -08:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
Sam Lantinga
a1afe6c175 tree 5b46fd5b8c94
parent 971b278f0756
author Edward Rudd <urkle@outoforder.cc> 1358022907 18000
committer Edward Rudd <urkle@outoforder.cc> 1358022907 18000
revision 6819
branch default

Remove some redundant assigns
2013-02-11 21:47:13 -08:00
Ryan C. Gordon
c1e8384624 Fixed logic bug. 2013-01-12 14:06:58 -05:00
Sam Lantinga
f380ecb137 Removed executable bit from source files 2012-09-27 14:35:28 -07:00
Sam Lantinga
721ac5f4d8 Fixed bug 1423 - Finger touch events don't report pressure
Philip Taylor 2012-02-19 08:34:52 PST

SDL_touch.c never actually uses the 'pressurein' arguments to
SDL_SendFingerDown/SDL_SendTouchMotion, so it doesn't report the real pressure.
Also it uses touch->pressureres which is never initialised. Also it fails to
initialise some fields of event.tfinger for certain events, so applications
might try to use bogus data.

The attached patch seems to be enough to produce generally sensible output on
Android.
2012-02-20 23:54:33 -05:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Sam Lantinga
ad2a21d404 Lots of fixes importing SDL source wholesale into a new iOS project
--HG--
rename : src/libm/math.h => src/libm/math_libm.h
2011-10-31 05:56:58 -04:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
5f55b90cbd Fixed linking x64 with Visual Studio 2010. 2011-03-08 22:48:21 -08:00
Sam Lantinga
a1dfcdb79d Fixed compiler warning 2011-03-06 21:15:28 -08:00
Sam Lantinga
7fda55f8d4 Fixed warnings about unused variables and so forth. 2011-02-17 02:18:41 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
e64d0e8d85 Fixed bug #1056 (Frequent crashes in Touch events by simply touching the screen)
Joseba García Echebarria      2010-12-15 01:55:22 PST

I believe the crash is caused by a check not being performed on wether an
SDL_Touch element is NULL before using it in the SDL_SendTouchMotion function
in src/events/SDL_touch.c around line 400.
Judging from the rest of the code, there's a missing

    if (!touch) {
        return 0;
    }

before using "touch" as SDL_GetFinger(), SDL_GetFingerIndexId() use
touch->num_fingers without checking.

I can attach a patch if you like. It seems pretty straightforward, though.

I have yet to discover why touch is being returned as NULL as this error is
only triggered when an actual gesture has been performed, maybe something
related to SDL_AddTouch()?
2011-01-28 10:21:58 -08:00
Sam Lantinga
f3716d8a4e Fixed size_t warnings on 64-bit build 2011-01-22 15:58:21 -08:00
Sam Lantinga
56c7ba92fb First pass at Windows multi-touch gesture support 2010-11-30 17:58:51 -08:00
Sam Lantinga
7411f7531b Fixed compiling with Visual Studio 2008 2010-08-29 14:22:22 -07:00
Andreas Schiffler
dc0f95c447 Update VS2010 project to add new files; update new files so code builds on Win32/Win64 2010-08-23 23:44:28 -07:00
Jim Grandpre
794c5cb3ee Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture 2010-08-15 00:36:28 -04:00
Jim Grandpre
bcd4b4df6f Fixed gestureMulti. Disabled dollar gesture temporarily. 2010-08-04 23:17:30 -04:00
Jim Grandpre
a4c4851398 Fixed some Gesture bugs 2010-08-02 00:14:53 -04:00
Sam Lantinga
b7caec8ae2 Fixed various type and print format issues 2010-07-31 20:38:37 -07:00
jimtla
39ee818f98 Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working). 2010-07-31 20:02:54 +04:00
jimtla
c9b9312be3 Upgraded touchId/fingerId to long. Changed position variables to floats. 2010-07-30 23:18:35 +04:00
Jim Grandpre
a4a0897a1d Prevented SDL_SendDown from sending on nonexistent touch devices. 2010-07-29 12:24:34 -04:00
Jim Grandpre
fcc9a5d29a Fixed Warning related to SDL_GestureAddTouch 2010-07-17 23:16:23 -04:00
Jim Grandpre
874300f89c Moved Multi finger gesture recognition into the library. 2010-07-07 04:13:08 -07:00
Jim Grandpre
06e66b928e Fixed bugs in input, cleaned up $1 2010-06-18 01:43:02 -04:00
Jim Grandpre
66e6be2acd Added $1 gesture recognition.
Functional.
2010-06-17 03:41:27 -04:00
jimtla
36b60b6ffd Fixed windo build errors. Should now be compilable. 2010-06-03 13:21:35 -04:00
Jim Grandpre
4960f0aff9 Added include/touch.h Now reading in resolution of touch pad. 2010-06-01 02:54:33 -04:00
Jim Grandpre
f75117cf0f Auto-detects Wacom touch devices. 2010-05-31 00:24:37 -04:00
Jim Grandpre
3dcae4341c Added pressure support for touch events. 2010-05-29 02:09:16 -04:00
Jim Grandpre
11b6823d3f Bug fixes. Basic touch events (finger up, finger down, finger move) supported. 2010-05-29 01:47:19 -04:00
Jim Grandpre
72c5a40b07 Added reading of event* for touch events. 2010-05-28 01:26:52 -04:00
Jim Grandpre
f806d39746 Added touch event definitions. Heavily modified events/SDL_touch*. 2010-05-27 01:21:37 -04:00
Jim Grandpre
27ad25a09d Added SDL_touch.c/SDL_touch_c.h as slightly modifeind SDL_mouse*. Made reads in touchSimp non-blocking. 2010-05-25 23:23:23 -04:00