Commit graph

11847 commits

Author SHA1 Message Date
Sam Lantinga
1ce6f5502a Fixed bug 4335 - Android NDK build error
dmuratshin

LOCAL_SRC_FILES shouldn't use $(LOCAL_PATH)
2018-10-28 14:17:21 -07:00
Sam Lantinga
925eba4300 Updated Android project files and documentation 2018-10-28 10:31:06 -07:00
Sam Lantinga
99a161adc7 This change looks okay in the general case.
If we run into problems where these events aren't dispatched (initialized on a different thread than the main thread?) we may need to create a separate thread to handle device notifications like we do with the windows joystick subsystem.
2018-10-26 20:20:28 -07:00
Ryan C. Gordon
c81e3972ba hidapi: Don't run a separate event loop for device notifications.
Fixes Bugzilla #4286.
2018-10-26 14:43:39 -04:00
Sam Lantinga
ada6e9687a Added patch note for SDL_GameControllerGetPlayerIndex() and friends 2018-10-26 09:49:27 -07:00
Sam Lantinga
c52506c862 Don't build SDL_JOYSTICK_HIDAPI by default on iOS
If you enable this, you'll need to link with CoreBluetooth.framework and add something like this to your Info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
2018-10-26 09:27:31 -07:00
Sam Lantinga
678ba78382 Generalized the XInput user index into a player index 2018-10-25 16:53:14 -07:00
Sam Lantinga
222a3ed235 Fixed initializing XInput user index 2018-10-25 13:22:34 -07:00
Sam Lantinga
0485c938d7 Added SDL_JoystickGetXInputUserIndex() 2018-10-25 12:54:42 -07:00
Sam Lantinga
2dc55a9175 Added vi style for the Emscripten joystick code 2018-10-25 12:54:39 -07:00
Ozkan Sezer
ea9baa6056 CMakeLists.txt: set dylib version numbers properly. (bug #2915.) 2018-10-25 11:11:02 +03:00
Sam Lantinga
1880564264 Fixed reinitializing the SDL joystick subsystem on Android 2018-10-23 12:40:25 -07:00
Ozkan Sezer
0f6d45f840 fix permissions 2018-10-23 09:10:02 +03:00
Sam Lantinga
9198904285 Change our fullscreen wait logic to only wait if we need to. (thanks Rachel!) 2018-10-22 14:55:47 -07:00
Sam Lantinga
cb0aa75cfe Handle failure to load hidapi gracefully 2018-10-22 14:55:45 -07:00
Sam Lantinga
c47d44bc42 Add exception handling to Android hidapi. 2018-10-22 14:55:42 -07:00
Ryan C. Gordon
698ad82c1f wasapi/win32: Sort initial device lists by device GUID.
This makes an unchanged set of hardware always report devices in the same
order on each run.
2018-10-21 22:40:17 -04:00
Ryan C. Gordon
0330891d77 x11: Fixed incorrect function signature for XkbSetDetectableAutoRepeat.
It needs to use Bool (which is an int) and not BOOL (which is CARD8), which
causes problems on platforms with different byte order and alignment, etc.

Fixes Bugzilla #4326.
2018-10-20 21:35:48 -04:00
Ryan C. Gordon
e5132f9f98 cocoa: Put a mutex around GL_SwapBuffers.
Prevents deadlock when swapping two different GL contexts on two different
threads at the same time on macOS 10.14 ("Mojave").

Fixes Bugzilla #4278.
2018-10-18 23:38:27 -04:00
Ryan C. Gordon
dc792b46b9 cocoa: Fix OpenGL rendering on macOS 10.14 ("Mojave").
Fixes Bugzilla #4272.
(transplanted from 86dcfbbcacaf0c4a556501644af11b7f99b4352d)

--HG--
branch : SDL-ryan-batching-renderer
extra : transplant_source : %86%DC%FB%BC%AC%AF%0CJUe%01dJ%F1%1B%7F%99%B45-
2018-10-18 12:05:05 -04:00
Ryan C. Gordon
c025d6c10e cocoa: GL_GetDrawableSize only uses -[NSView convertRectToBacking] for highDPI.
On Mojave, this will report large numbers for retina displays in fullscreen
mode, which isn't how it works on previous versions.
(transplanted from a02aa66a76d84f7cb4181125c926e978b2284a57)

--HG--
branch : SDL-ryan-batching-renderer
extra : transplant_source : %A0%2A%A6jv%D8O%7C%B4%18%11%25%C9%26%E9x%B2%28JW
2018-10-18 11:59:48 -04:00
Ryan C. Gordon
637cfa5d6b Small stack allocations fall back to malloc if they're unexpectedly large.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-22 20:50:32 -04:00
Ryan C. Gordon
1c7254cb58 opengles2: Fixed several incorrect things.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-06 17:08:04 -04:00
Ryan C. Gordon
41007ab39f opengles2: removed useless memcpy.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-04 21:10:42 -04:00
Ryan C. Gordon
3b9a14d823 opengles2: Fixed incorrect cliprect state.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-04 20:22:28 -04:00
Ryan C. Gordon
ceefc68ccb metal: CopyEx transform matrix must be aligned for constant buffer access.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-04 20:21:58 -04:00
Ryan C. Gordon
b7db24b141 metal: Don't try to create a zero-byte vertex buffer.
(Which will cause a crash in Metal, or an assert in the validation layer.)

--HG--
branch : SDL-ryan-batching-renderer
2018-10-04 20:21:23 -04:00
Ryan C. Gordon
7d96cb5cef render: Added SDL_RenderFlush().
--HG--
branch : SDL-ryan-batching-renderer
2018-10-04 16:34:44 -04:00
Ryan C. Gordon
5f11d18f0d render: Move PSP backend to new interface.
I have no idea if this works (or if it ever worked, having now examined this
code), as I have no way to compile or test this.

If it's broken, send patches.  :)

--HG--
branch : SDL-ryan-batching-renderer
2018-10-04 16:11:43 -04:00
Ryan C. Gordon
49670f5555 render: moved software renderer to new interface.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-03 23:37:29 -04:00
Ryan C. Gordon
a0efc7ab09 render: D3D11 now cycles through 8 vertex buffers.
This means it doesn't have to block while the current frame finishes using the
vertex buffer; it just moves on to the next, probably-not-in-use buffer.

--HG--
branch : SDL-ryan-batching-renderer
2018-10-03 19:05:20 -04:00
Ryan C. Gordon
c1de5c9555 render: D3D11 renderer patched to compile.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-03 18:23:53 -04:00
Ryan C. Gordon
048c707bc7 render: first (untested!) shot at converting D3D11 renderer to new interfaces.
Probably doesn't even compile yet.

--HG--
branch : SDL-ryan-batching-renderer
extra : histedit_source : a386a4b001a3cc26ea67e75b607b43b8343ea955
2018-10-03 00:52:37 -04:00
Ryan C. Gordon
e33a87b4e6 render: Make the GL backends cache and defer more state changes.
--HG--
branch : SDL-ryan-batching-renderer
extra : histedit_source : 9989445300dd74771e6143b70ef194e88d123c18
2018-10-01 22:53:45 -04:00
Ryan C. Gordon
c60a01a082 render: D3D9 doesn't need to check for stream offset support anymore.
We don't use offsets at all now. Too slow.

--HG--
branch : SDL-ryan-batching-renderer
extra : histedit_source : bf5eafc07800e64529ffc423abf3e605aa965264
2018-10-01 13:41:15 -04:00
Ryan C. Gordon
7aab4dc8b9 render: Set the D3D9 stream source once and choose offsets during draw calls.
This is _much_ faster than setting the offsets with SetStreamSource!

--HG--
branch : SDL-ryan-batching-renderer
2018-10-01 11:32:08 -04:00
Ryan C. Gordon
d6753c690b render: Patched to compile.
--HG--
branch : SDL-ryan-batching-renderer
2018-10-01 03:02:54 -04:00
Ryan C. Gordon
8a2013f1c2 render: first shot at moving Direct3D 9 backend to new interface. Untested!
--HG--
branch : SDL-ryan-batching-renderer
2018-10-01 01:23:02 -04:00
Ryan C. Gordon
8e76fc1c37 render: patched to compile on C89 compilers, other untested code fixes.
--HG--
branch : SDL-ryan-batching-renderer
2018-09-29 04:00:38 +00:00
Ryan C. Gordon
454906e0b9 opengles1: set some non-zero drawstate defaults.
--HG--
branch : SDL-ryan-batching-renderer
2018-09-28 19:48:14 -04:00
Ryan C. Gordon
3fb340541a render: moved opengles2 over to new interface.
--HG--
branch : SDL-ryan-batching-renderer
2018-09-28 19:47:44 -04:00
Ryan C. Gordon
4741821e57 cocoa: Force an OpenGL context update when the window becomes key.
Fixes missing rendering on macOS 10.14 ("Mojave").

Fixes Bugzilla #4272.
(transplanted from 55489adbb75c8eb7c7719a3f9c85a15d06df2f27)

--HG--
branch : SDL-ryan-batching-renderer
extra : transplant_source : UH%9A%DB%B7%5C%8E%B7%C7q%9A%3F%9C%85%A1%5D%06%DF/%27
2018-09-26 20:10:32 -04:00
Ryan C. Gordon
1da21e6740 render: Do state cache improvements for GLES1, too.
--HG--
branch : SDL-ryan-batching-renderer
2018-09-25 21:35:09 -04:00
Ryan C. Gordon
e523763256 render: OpenGL renderer now caches some state, to improve non-batching mode.
(other minor bug fixes in here, too)

--HG--
branch : SDL-ryan-batching-renderer
extra : amend_source : 1232922bfab60e6b4f23f1c2a35275716ed273bb
2018-09-25 19:20:31 -04:00
Ryan C. Gordon
6292445c7a render: Move non-batching flushes to different place.
This lets us batch up a few commands that are all related to the same API
call.

--HG--
branch : SDL-ryan-batching-renderer
2018-09-25 17:04:47 -04:00
Ryan C. Gordon
d96daf4a28 render: opengles renderer actually works now. :)
--HG--
branch : SDL-ryan-batching-renderer
2018-09-25 16:17:10 -04:00
Ryan C. Gordon
0675f2fa39 render: First shot at converting opengles renderer to new interfaces.
--HG--
branch : SDL-ryan-batching-renderer
extra : source : db6a2cf729c557a192ec767944bae3168dde3960
2018-09-25 10:41:25 -04:00
Ryan C. Gordon
dbf1408ad8 render: get rid of the predeclared functions in the GL and Metal renderers.
(others to come as I continue to update render backends!)

--HG--
branch : SDL-ryan-batching-renderer
extra : source : 17cc45c0b2e4274617a5ed8ac06f819d3eb40717
2018-09-24 12:30:47 -04:00
Ryan C. Gordon
7b78f799ae render: Make opengl backend take advantage of new high-level features.
--HG--
branch : SDL-ryan-batching-renderer
extra : source : f4665fc62a607285c0c2352dadeb3b290c29d097
2018-09-24 02:08:34 -04:00
Ryan C. Gordon
b8773215d9 render: Add command queue debug logging.
--HG--
branch : SDL-ryan-batching-renderer
extra : source : 7b514b380529e2e8d77cd63eda3fb81cc96d42a9
2018-09-24 02:07:35 -04:00