Commit graph

253 commits

Author SHA1 Message Date
Sam Lantinga
c6ac556871 The table is now a scancode mapping table, not a virtual key mapping table 2013-02-28 21:48:12 -08:00
Jørgen P. Tjernø
383deb9a61 sdl2
- more scancode goodness, removing now dead wparam translation code
- add scancode for SDL_SCANCODE_NONUSBACKSLASH
- don't translate sdl key values for numeric and grave key

CR: SamL
2013-02-25 16:52:51 -08:00
Jørgen P. Tjernø
cf58b77360 sdl2
- change the windows scancode logic to use the scan code value in lparam rather than VK's to get a stable scancode value across different KB layouts
2013-02-25 16:52:42 -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
Sam Lantinga
0c9fca187f Don't reset the mouse, that's actually bad behavior most of the time for windowed applications. 2013-01-27 20:37:14 -08:00
Andreas Schiffler
3bc9dbe16c Add input validation to SDL_GetKeyFromScancode; fix compiler warning in testautomation driver on Linux; update keyboard test suite 2013-01-13 22:55:26 -08:00
Andreas Schiffler
b4a190fb6f Update SDL_InvalidParamError to take param name; add additional fuzzer function; add new tests to keyboard test suite; improve surface test suite 2013-01-12 22:58:12 -08:00
Ryan C. Gordon
c1e8384624 Fixed logic bug. 2013-01-12 14:06:58 -05:00
Andreas Schiffler
71eabe59cb Add a few keyboard tests; fix missing input validation in SDL_GetKeyFromName 2013-01-07 07:39:15 -08:00
Sam Lantinga
dfe7f2bc59 Improvements from Alfred:
- Add new SDL_WINDOW_FULLSCREEN_DESKTOP video mode, makes a fullscreen window the size of the desktop (i.e no window manager mode change)
- Fix crash in warp mouse if you specified null as the window
- Added new SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS Hint, if set to 0 then don't minimize a fullscreen window on focus lost (if not set or set to non-zero then minimize on focus loss)
2012-12-15 00:30:17 +00:00
Sam Lantinga
80493dfae0 Only check SDL_SYS_JoystickNeedsPolling() if we know we don't need to poll for other reasons. This avoids a select() syscall on Linux if it isn't necessary. 2012-12-14 09:22:13 -08:00
Sam Lantinga
34b88dfaae Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00
Michael Sartain
8f081103e5 Add SDL_CreateSystemCursor for Windows and Linux. 2012-11-19 15:11:10 -08:00
Sam Lantinga
ea22b37504 Nobody will EVER use more than 8 buttons. Oh wait... Nobody will EVER use more than 32 buttons... 2012-11-12 12:14:44 -08:00
Sam Lantinga
eda1373611 We can't check for the screen keyboard in the event code because the video system isn't fully initialized yet. 2012-11-09 02:18:27 -08:00
Sam Lantinga
6e2b3886a8 Leave text input enabled unless text input shows some on-screen UI elements 2012-11-08 11:18:21 -08:00
Sam Lantinga
80c4c387ed Neither Windows nor Linux allow dragging out of the window without some sort of mouse capture, so for now punt on that behavior. 2012-11-08 11:15:02 -08:00
Sam Lantinga
138cd7fa11 Reset the mouse button state when losing mouse focus.
Implemented mouse focus handling entirely using mouse motion events, with SetCapture() semantics, as long as the windowing system continues to provide mouse events.
2012-11-08 02:26:40 -08:00
Sam Lantinga
ea720974f5 Reset the keyboard before we lose focus so the correct window is listed in focus events. 2012-11-08 01:07:29 -08:00
Sam Lantinga
7f73dcd4f6 Reset the keyboard when we lose input focus 2012-11-07 11:13:28 -08:00
Sam Lantinga
e7b4458d8b Synchronized the on-screen keyboard state with whether we are accepting text input.
The functions to show/hide/toggle the on-screen keyboard have been folded into the text input state.
Calling SDL_StartTextInput() will automatically show the on-screen keyboard if it's available.
Calling SDL_StopTextInput() will automatically hide the on-screen keyboard if it's available.
There is a new API function SDL_IsTextInputActive() which will return whether text input is currently active.
Text input is disabled by default, you must call SDL_StartTextInput() when you are ready to accept text input.
SDL_HasScreenKeyboardSupport() no longer needs to be passed a window.
The iPhone-specific on-screen keyboard functions have been removed.
2012-11-04 21:53:28 -08:00
Sam Lantinga
211e6c359c Allow events at startup so we don't lose important events like SDL_DROPFILE 2012-10-14 01:30:42 -07:00
Sam Lantinga
316add4b4b WINDOW_RESIZED events shouldn't flush WINDOW_SIZE_CHANGED events and vice versa. 2012-09-29 01:10:53 -07:00
Sam Lantinga
29b5947d0c Clear the queue active flag when we shutdown, so we don't have a mutex error trying to read the queue. 2012-09-28 03:54:39 -07:00
Sam Lantinga
f380ecb137 Removed executable bit from source files 2012-09-27 14:35:28 -07:00
Wim Looman
0925c1dd78 Make mouse relative mode save the original co-ordinates to restore them
properly.
2012-02-04 00:13:21 +13:00
Wim Looman
b7f2ad8ad0 Change SDL_SetCursor to set the cursor back to the default cursor when the
window is unfocused.
2012-02-03 23:53:51 +13:00
Wim Looman
0da1c5b3ae Fix null reference exception.
Occurred when using relative mouse mode without a focused window.
2012-02-03 23:08:48 +13: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
3a7d58ddf8 Fixed bug 1336 - Added a timestamp on all SDL events
Gueniffey 2011-11-23 04:11:31 PST

The attached simple patch adds a timestamp to all SDL events. It is useful to
dismiss old events and add UI responsiveness (my application does some
extensive tasks that creates a delay in the event queue handling. With this
patch, I can deal only with the most recent events.
2011-12-29 05:13:55 -05:00
Ryan C. Gordon
5c8b76f6a9 Fixed a tabstop. 2011-12-05 13:13:32 -05:00
Sam Lantinga
f52f040b3d First pass at a simple drag and drop API, allowing you to accept files dropped into your application. 2011-11-20 19:38:18 -05:00
Ryan C. Gordon
9bfdb9ee33 Fixed uninitialized variable. 2011-11-08 19:45:41 -05:00
Ryan C. Gordon
311a3e9453 Merge from https://bitbucket.org/keestux/sdl ... SDL_gesture code cleanup. 2011-11-08 16:24:02 -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
Kees Bakker
8d5ba0eb26 Type of SDL_GestureTouch.id is SDL_TouchID (only for SDL_gesture.c internal) 2011-10-27 23:04:50 +02:00
Kees Bakker
9e6ee9e79a Correct usage of SDL_AddDollarGesture (return value >= 0 on success) 2011-10-27 22:53:28 +02:00
Kees Bakker
9f6e4ab9ab Refactor SDL_AddDollarGesture 2011-10-27 22:52:03 +02:00
Kees Bakker
3c27fa1eff Reformat SDL_gesture.c (part 2, space after keywords) 2011-10-27 22:23:09 +02:00
Kees Bakker
428e61a43e Reformat SDL_gesture.c (part 1, reindent using Emacs, c-basic-offset 4) 2011-10-27 21:26:44 +02:00
Sam Lantinga
ee56d1a748 Added SDL_GetScancodeFromName() and SDL_GetKeyFromName() 2011-10-24 21:34:54 -04:00
Ryan C. Gordon
bc13816375 Fixed a whole slew of compiler warnings that -Wall exposed. 2011-10-13 01:08:30 -04:00
Ryan C. Gordon
4b70200bf8 Work on systems without sa_sigaction. 2011-07-20 16:35:37 -07:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
e17ed1c762 Fixed compile error. 2011-03-29 03:05:26 -07:00
Sam Lantinga
b705071877 Filter out SDL_WINDOWEVENT_SIZE_CHANGED events too 2011-03-28 23:44:51 -07:00
Sam Lantinga
6373d8954b Fixed compiler warning 2011-03-21 13:33:53 -07:00
Sam Lantinga
45e584dd37 Do not break application's signal handler installed with SA_SIGINFO
Gleb Natapov to sdl

If application installs SIGINT/SIGTERM signal handler with
sigaction(SA_SIGINFO) syscall before initializing SDL, after
initialization
of SDL signal handler will be reinstalled without SA_SIGINFO flag which
brings havoc when the signal handler is called. The breakage is done by
SDL_QuitInit()/SDL_QuitQuit() function. They use signal() to detect that
signal handler is already installed even in sigaction() is available.
2011-03-15 21:37:01 -07:00