Commit Graph

2253 Commits

Author SHA1 Message Date
Sylvain Becker
d984f323fc Fixed bug 3827 - issue with MapRGB, palette and colorkey
For palette surface, SDL_MapRGB() returns different values whether colorkey is
set or not.
2019-01-21 19:53:06 +01:00
Sylvain Becker
2bd26b8da8 Fixed bug 3827 - issue with MapRGB, palette and colorkey
For a palettized surface, prevent SDL_MapRGB() value to change whether colorkey is set or not.
2019-01-21 18:45:15 +01:00
Sam Lantinga
7b354dda76 Fixed compiler warning 2019-01-20 13:53:16 -08:00
Sylvain Becker
8ad4000ce2 Android: some typos 2019-01-20 22:17:41 +01:00
Sylvain Becker
b9aa3768ac Android: automatically attach to the JVM non-SDL threads
It allows a thread created with pthread_create() to access the JNI Env
2019-01-20 22:11:56 +01:00
Sam Lantinga
61827c6d1a Fixed compiler warning on Android 2019-01-20 12:02:12 -08:00
Sylvain Becker
07548602d6 Fixed bug 3657 - Color-key doesn't work when an alpha channel is present
When surface format is the same as renderer format, it still needs an
intermediate conversion to transform colorkey to alpha.
2019-01-19 16:47:43 +01:00
Sylvain Becker
e5f8801f55 Android: prevent concurrency in Android_SetScreenResolution() when exiting
by checking Android_Window validity

- SDLThread: user application is exiting:
    SDL_VideoQuit() and clearing SDL_GetVideoDevice()

- ActivityThread is changing orientation/size
    surfaceChanged() > Android_SetScreenResolution() > SDL_GetVideoDevice()

- Separate function into Android_SetScreenResolution() and Android_SendResize(),
    formating, and mark Android_DeviceWidth/Heigh as static
2019-01-17 11:05:05 +01:00
Sylvain Becker
ede0fc4f4c Fixed bug 4024 - remove trailing comma of Controller mappings
because it reports an error "Unexpected controller element"
2019-01-16 14:03:35 +01:00
Sylvain Becker
8a19ff3e2d Android: add mutex protection to onNativeOrientationChanged
it's possible receive try to send an event between the check first for SDL_GetVideoDevice
and SDL_VideoQuit is called
2019-01-16 10:48:28 +01:00
Sylvain Becker
e994be5833 Android: move static variable isPaused/isPausing to SDL_VideoData structure
- remove unneed check to Android_Window->driverdata
- add window check into context_backup/restore
2019-01-16 10:31:51 +01:00
Ryan C. Gordon
861a21f98b evdev: don't debug log on a BTN_TOUCH from a non-touch device. 2019-01-14 19:43:25 -05:00
Ryan C. Gordon
2755a505a3 evdev: Add touchscreen mouse emulation and pressure support (thanks, Zach!).
This also solves reports of this log message:

"INFO: The key you just pressed is not recognized by SDL. To help get this
fixed, please report this to the SDL forums/mailing list
<https://discourse.libsdl.org/> EVDEV KeyCode 330"

(EVDEV KeyCode 330 is BTN_TOUCH.)

Fixes Bugzilla #4147.
2019-01-14 19:36:54 -05:00
Sylvain Becker
dc263450ff Android: create Pause/ResumeSem semaphore at higher level than CreateWindow()
- If you call onPause() before CreateWindow(), SDLThread will run in infinite loop in background.

- If you call onPause() between a DestroyWindow() and a new CreateWindow(), semaphores are invalids.

SDLActivity.java: the first resume() starts the SDLThread, don't call
nativeResume() as it would post ResumeSem. And the first pause would
automatically be resumed.
2019-01-14 23:33:48 +01:00
Sylvain Becker
1b24b2eca5 Android/openslES: fix Pause/ResumeDevices when openslES is not used 2019-01-14 22:56:57 +01:00
Sylvain Becker
647b1f6a6d Android/openslES: check for non NULL variable, some intialization.
use the previous naming
2019-01-14 14:36:13 +01:00
Sylvain Becker
7b1cc441dd Android/openslES: start playing, after creating ressources 2019-01-14 14:31:06 +01:00
Sylvain Becker
955d87894b Android/openslES: set audio in paused/resumed state for Android event loop
And also in "stopped" state before closing the device.
2019-01-14 12:33:29 +01:00
Sylvain Becker
59c8c7b684 Android/openslES: move a few static variables to SDL_PrivateAudioData structure 2019-01-14 10:58:57 +01:00
Sylvain Becker
5aeeaaab70 Android/openslES: register and use CloseDevice function. 2019-01-14 10:16:26 +01:00
Sylvain Becker
365fd9c602 Android/openslES: some space and indentation to match SDL conventions 2019-01-14 10:04:54 +01:00
Sam Lantinga
7dc92a7669 Initial Android OpenSL ES implementation, contributed by ANTA 2019-01-12 12:18:44 -08:00
Sam Lantinga
fb8cb95fbc Fixed compiler warning 2019-01-12 12:12:43 -08:00
Sylvain Becker
be991f3a78 Fixed bug 4453 - GLES / GLES2: first white renderer clear cmd is drawn as black 2019-01-12 13:34:03 +01:00
Sylvain Becker
7b42f03fd9 Android: move and group JNIEnv helper functions 2019-01-11 21:52:43 +01:00
Sylvain Becker
7f3478305f Android: change the way JNIEnv is retrieved
- Currently, it tries to Attach the JVM first and update the thread local storage, which are two operations.
  Now, it simply gives back the JNI Env stored for the thread.

- Android_JNI_SetupThreadi() should only be used for external.
  For internal SDL thread, it's already called in RunThread() (SDL_systhread.c),
  and other thread are Java threads which don't need to be attached. i
  (even if it doesn't hurt to do it, since it's a no-op).

- JNI_OnLoad is filled with pthread_create, GetEnv, AttachCurrentThread...
  It's called for all shared libraries which may don't want this setup,
  and loading libraries can be also modified to be done from a static context,
  or with relinker. So it's not really clear how, who and what it sets up.
  => Reduce this function to the minimal
2019-01-11 21:42:52 +01:00
Sylvain Becker
dc10d96cde Android: use the same naming for JNI env local variables 2019-01-11 15:36:16 +01:00
Sylvain Becker
3cfd907df7 Android: Audio thread is already setup for the JVM
In 'src/thread/pthread/SDL_systhread.c' RunThread() calls first 'Android_JNI_SetupThread()'
2019-01-11 15:33:02 +01:00
Sylvain Becker
9d82f4e985 Android: use pthread_once for creating thread key 'mThreadKey' 2019-01-11 15:27:53 +01:00
Sylvain Becker
9a98e5afe1 Android: don't call Android_JNI_ThreadDestroyed() for Java SDLThread
SDLThread is a Java Thread, it's not needed to call 'Detach' from the JVM.
Clear mThreadKey, so that the pthread_create destructor is not called for this
thread.
2019-01-11 14:50:43 +01:00
Sylvain Becker
b44a7aea8f Android: fix prototype of Android_JNI_InitTouch 2019-01-10 21:49:00 +01:00
Sylvain Becker
7a1d1baefc Android: add name for Touch devices and simplification, from bug 3958 2019-01-10 21:40:57 +01:00
Sylvain Becker
d23c2f07e3 Fixed bug 3930 - Android, set thread priorities and names
SDLActivity thread priority is unchanged, by default -10 (THREAD_PRIORITY_VIDEO).

SDLAudio thread priority was -4 (SDL_SetThreadPriority was ignored) and is now -16 (THREAD_PRIORITY_AUDIO).

SDLThread thread priority was 0 (THREAD_PRIORITY_DEFAULT) and is -4 (THREAD_PRIORITY_DISPLAY).
2019-01-10 18:05:56 +01:00
Sylvain Becker
66fbfe1d00 Android: nativeQuit for SDLActivity thread
- destroy Android_ActivityMutex
- display any SDL error message that may have occured in this thread,
  since SDL_GetError() is thread specific, and user has no access to it.
2019-01-10 15:43:07 +01:00
Sylvain Becker
dad8161103 Android: only send Quit event to SDLThread if it's not already terminated
And it avoids reporting errors using Android_Pause/ResumeSem that are NULL.
2019-01-10 15:35:46 +01:00
Sylvain Becker
8dd915507e Android: prevent a dummy error message sending SDL_DISPLAYEVENT_ORIENTATION
In the usual case, first call to onNativeOrientationChanged() is done before
SDL has been initialised and would just set an error message
"Video subsystem has not been initialized" without sending the event.
2019-01-09 23:19:26 +01:00
Sylvain Becker
02f292eb13 Android: add some SetError for Android_SetWindowFullscreen
First error could happen if Android_SetWindowFullscreen somehow gets
called between SurfaceDestroyed() and SurfaceCreated()

Second error should not happen has native_window validity is guaranteed.
(It would happens previously with error -19)
2019-01-09 22:49:49 +01:00
Sylvain Becker
68c0e69f0a Android: native_window validity is guaranteed between surfaceCreated and Destroyed
It's currently still available after surfaceDestroyed().
And available (but invalid) between surfaceCreated() and surfaceChanged().

Which means ANativewindow_getWidth/Height/Format() fail in those cases.

https://developer.android.com/reference/android/view/SurfaceHolder.html#getSurface()
2019-01-09 22:41:52 +01:00
Sylvain Becker
1803944bb2 Android: concurrency issue for Android_SetWindowFullscreen()
It accesses data->native_window, which can be changed by onNativeSurfacedChanged().

Currently, Android_SetWindowFullscreen() may access data->native_window after it
has been released, and before a new reference is acquired.

(can be reproduced by adding some SDL_Delay() in onNativeSurfacedChanged and
Android_SetWindowFullscreen() ).
2019-01-09 15:18:41 +01:00
Sylvain Becker
cfe2924d07 Android: some robustness when quitting application from onDestroy()
Make sure there is not pending Pause accumulated, so the the application doesn't
remain paused and stucked in onDestroy().

Can be tested by adding:
 SDLActivity.nativePause();
 SDLActivity.nativePause();
 mSingleton.finish();
2019-01-07 11:35:31 +01:00
Sylvain Becker
462e62e154 Android: better fix for bug 3186. Run those commands from SDL thread. 2019-01-06 20:25:54 +01:00
Sylvain Becker
9f23d1815f Android: allow multiple calls to nativeResume()
Doesn't seem to happen manually, but symetrical to the pause handling.

Can be tested by adding:

mNextNativeState = SDLActivity.NativeState.PAUSED;
handleNativeState();
mNextNativeState = SDLActivity.NativeState.RESUMED;
handleNativeState();
mNextNativeState = SDLActivity.NativeState.PAUSED;
handleNativeState();
mNextNativeState = SDLActivity.NativeState.RESUMED;
handleNativeState();

Before, it ends in 'paused' state.
Now, it ends in 'resumed' state.
2019-01-06 17:35:42 +01:00
Sylvain Becker
e4f558a50c Android: un-needed check of "isPausing" and minor typos 2019-01-05 22:46:52 +01:00
Sylvain Becker
35722b6423 Android: fix wrong state after immediate sequence pause() / resume() / pause()
It may happen to have the sequence pause()/resume()/pause(), before polling
any events.

Before, it ends in 'resumed' state because as the check is greedy.
Now, always increase the Pause semaphore, and stop at each pause.
It ends in 'paused' state.

Related to bug 3250: set up a reconfiguration of SurfaceView holder.
Turn the screen off manually before the app starts
(repro rate is not 100%..)
2019-01-05 22:27:25 +01:00
Sam Lantinga
d4c0f498db Fixed bug 4255 - SDL_GetGlobalMouseState() returns incorrect Y on secondary display
Julian Raschke

I use an open Mac laptop with an additional external monitor. The coordinate spaces from SDL_GetGlobalMouseState() and SDL_GetWindowPosition() match on the primary display, but not on the secondary display.

Cocoa window coordinates are vertically flipped in relation to the primary display:

https://github.com/spurious/SDL-mirror/blob/release-2.0.8/src/video/cocoa/SDL_cocoawindow.m#L219-L222

However, Cocoa_GetGlobalMouseState inverts the cursor Y coordinate per-display:

https://github.com/spurious/SDL-mirror/blob/release-2.0.8/src/video/cocoa/SDL_cocoamouse.m#L320-L323

Suggested fix: Replace the for-loop with this simpler calculation:

    *x = (int) cocoaLocation.x;
    *y = (int) (CGDisplayPixelsHigh(kCGDirectMainDisplay) - cocoaLocation.y);
2019-01-04 22:09:38 -08:00
Sam Lantinga
5e13087b0f Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sylvain Becker
2a885eb036 Android: fixed immediate transition to pause and resume.
"Pause" transition will add events:
 SDL_WINDOWEVENT_ENTER
 SDL_WINDOWEVENT_FOCUS_LOST
 SDL_WINDOWEVENT_MINIMIZED
 SDL_APP_WILL ENTER BACKGROUND
 SDL_APP_DID ENTER BACKGROUND

"Resume" transition will add events:
 SDL_APP_WILL ENTER FOREGROUND
 SDL_APP_DID ENTER FOREGROUND
 SDL_WINDOWEVENT_FOCUS_GAINED
 SDL_WINDOWEVENT_RESTORED

If Android application doesn't empty the event loop in between, it enters in
"paused" state when SDL_WINDOWEVENT_RESTORED is fetched.

See bug 3250 for pratical case.
2019-01-04 23:39:27 +01:00
Sylvain Becker
cf12234454 Android: make Android_PumpEvents() more readable
No behavior change in this commit.
2019-01-04 23:11:21 +01:00
Sylvain Becker
ca184ac386 Android: concurrency issue with egl_surface EGL_BAD_SURFACE - (bug 4142)
Occurs when application goes to background:
- Java activity is destroying SurfaceView holder and "egl_surface" (in onNativeSurfaceDestroyed())
- While native thread is in Android_GLES_SwapWindow(), prepared to call SDL_EGL_SwapBuffers()

The error is "call to eglSwapBuffers failed, reporting an error of EGL_BAD_SURFACE"

It an be reproduced easily by adding a SDL_Delay(100) at the begining of SDL_EGL_SwapBuffers(),
and putting the application into background.
2019-01-03 23:22:50 +01:00
Sylvain Becker
2e19343df6 Android: use Mutex instead of Semphore for bug 4142 2019-01-03 20:18:29 +01:00
Sylvain Becker
23478642bd Android: prevent the error message from SDL_EGL_CreateSurface() to be masked. 2019-01-03 16:22:33 +01:00
Sylvain Becker
cc8f1136b6 Fixed bug 4142 - Concurrency issues in Android backend
Use a semaphore to prevent concurrency issues between Java Activity and Native thread code, when using 'Android_Window'.
(Eg. Java sending Touch events, while native code is destroying the main SDL_Window. )
2019-01-03 14:18:06 +01:00
Sylvain Becker
d11f7615fa Android: minor preparation for bug 4142 (concurrency issues) 2019-01-03 13:38:33 +01:00
Sylvain Becker
5dc25fef3b Android: preparation bug 4142, reduce usage of global variable Android_Window 2019-01-03 13:14:16 +01:00
Sylvain Becker
a95f91bcea Fixed bug 3250 - Wrong backbuffer pixel format on Android, keep getting RGB_565
Use the egl format to reconfigure java SurfaceView holder format.
If there is a change, it triggers a surfaceDestroyed/Created/Change sequence.
2019-01-02 18:06:33 +01:00
Sylvain Becker
03b0e1dee0 Android: on rare occasion, prevent Android_JNI_GetNativeWindow() from crashing
If Java getNativeSurface() returns null, then ANativeWindow_fromSurface() would crash().
2018-12-30 22:44:25 +01:00
Sylvain Becker
1e22fc1513 Android: fixed comments and spaces 2018-12-30 15:41:28 +01:00
Sylvain Becker
2a412eb94c Fixed bug 3186 - Android SW keyboard not restored when app becomes foreground. 2018-12-30 15:39:37 +01:00
Sylvain Becker
9cdd0dd996 PSP renderer: use colors from 'draw' union (very likely, but un-tested) 2018-12-29 17:59:34 +01:00
Sylvain Becker
ebd9efb361 opengles 1: same fix as in bug #4433 2018-12-29 16:37:44 +01:00
Sylvain Becker
87b7636918 opengles 1: use color from 'draw' union in SetDrawState() 2018-12-29 16:34:50 +01:00
Alex Szpakowski
dc3443602b render: Fix internal state getting out of sync when destroying a texture that was just rendered and then creating a new one, in the GL and GLES2 backends. Fixes bug #4433. 2018-12-21 20:53:31 -04:00
Ryan C. Gordon
0a70590118 render: Prefer the Metal renderer over OpenGL.
This is the best option for macOS and iOS, the only platforms with Metal.

Pre-Metal versions of these platforms will fall back to OpenGL (ES), as
appropriate.

Huge thanks to Alexander Szpakowski, who worked incredibly hard to get the
Metal renderer to such a high-quality state!
2018-12-19 18:10:02 -05:00
Alex Szpakowski
c7db6ade7d metal: Implement SDL_LockTexture for YUV formats. 2018-12-19 18:27:21 -04:00
Alex Szpakowski
ce8c716ada metal: Implement SDL_LockTexture for non-YUV textures. 2018-12-18 14:23:05 -04:00
Sylvain Becker
c0c8f2d703 Gesture: remove warnings when ENABLE_DOLLAR is undefined. 2018-12-16 11:15:21 +01:00
Ryan C. Gordon
13869f194c cocoa: Implement OpenGL swap interval support with CVDisplayLink.
Not only does this fix macOS 10.14 ("Mojave")'s broken NSOpenGLCPSwapInterval
support, it also lets us implement "adaptive vsync" on macOS!

CVDisplayLink is supported back to macOS 10.4 ("Tiger"), so we just use it
universally without version checks and dump NSOpenGLCPSwapInterval, Mojave or
not.
2018-12-16 01:03:17 -05:00
Sylvain Becker
1ed6021960 Fixed bug 4426 - allows re-creation of software renderer
Switching between renderers "software -> opengl -> opengles2 -> software" fails.

"opengl -> opengles2" calls SDL_RecreateWindow() and frees "window->surface"
without marking it as "surface_invalid".
2018-12-15 16:21:24 +01:00
Ryan C. Gordon
1829692753 emscripten: SDL_PrivateJoystickAdded() wants an instance id, not device index. 2018-12-15 09:57:05 -05:00
Sylvain Becker
e5476c653d Fixed bug 4425 - promote to alpha format, palette surface with alpha values.
SDL_CreateTextureFromSurface() forgets to choose a texture format with alpha for
surfaces that have palettes with alpha values.
2018-12-15 14:50:12 +01:00
Sam Lantinga
bd08d72dec Fixed building with the 10.10 SDK 2018-12-11 20:04:10 -08:00
Sam Lantinga
98829d37e8 Handle both "Sony Interactive Intertainment" and "Sony Computer Entertainment" when ignoring motion sensors 2018-12-11 19:50:58 -08:00
Ethan Lee
0b6e24f7e7 Linux Haptic: Fix periodic.magnitude value 2018-12-06 14:26:18 -05:00
Sam Lantinga
1c9595b16f Fixed bug 4415 - SDL menu bar is nonstandard on Mac
foo.null

I'm on macOS 10.14 and I think I'm using or around SDL 2.0.9. This is about the menu bar that SDL sets up which looks like:

<App Name> <Window> <View>

1. View menu never proceeds after the Window menu in any Mac application (it is always before).
2. For SDL, the only purpose of the View menu is for a single fullscreen menu item, which is not justifiable enough to reserve space for a menu. The View menu should thus be removed, and the full screen menu item should be added at the end inside of Window's menu. See built in apps like Dictionary, Chess, App Store (on 10.14) that do this.
3. SDL should add a "Close" menu item to the Window's submenu, and it should be the first item. Its key equivalent should map to command w. Without this, you cannot close the game window via this shortcut, and you cannot close the app's About window via this shortcut.
4. Apps typically use "Enter Full Screen" or "Exit Full Screen" depending on context, not "Toggle Full Screen" which is less user friendly -- I personally care about this point the least.
2018-12-08 11:06:40 -08:00
Sam Lantinga
70ce0f2e06 Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file to load at initialization containing SDL game controller mappings 2018-12-07 12:02:08 -08:00
Sam Lantinga
898644d18e Made it more clear that the values being compared are floats 2018-12-06 09:09:05 -08:00
Brandon Schaefer
f9192ab8fc wayland: Do not try to lock on an invalid pointer
This happens if you try to lock the pointer and (caps & WL_SEAT_CAPABILITY_POINTER) is false
Leading to input->pointer being NULL which ends up bringing the wayland client down (at lease on weston)
2018-12-06 10:39:33 -05:00
Sylvain Becker
7468d1e096 Fix warnings detected on Android build 2018-12-06 15:46:40 +01:00
Sylvain Becker
39ec1699e7 opengles2: fix prototype of glDeleteBuffers 2018-12-06 10:24:44 +01:00
Sylvain Becker
252dc85e95 Fix warnings detected on Android build 2018-12-06 09:22:00 +01:00
Ryan C. Gordon
a7563bcd3d joystick: Removed unused variable. 2018-12-05 19:03:15 -05:00
Ryan C. Gordon
c7b713714a Whoops, forgot to add a new source file. :/ 2018-12-05 17:53:38 -05:00
Sam Lantinga
6ed76ae18f Fixed the ROCCAT Tyon mouse showing up as a joystick on Windows 2018-12-05 14:46:03 -08:00
Ryan C. Gordon
fbead63540 joystick: Added controller config for IMS Passenger Control Unit Devices. 2018-12-05 16:55:59 -05:00
Ryan C. Gordon
2878d4f80c egl: Don't force X11 support when testing for EGL.
Fixes building Wayland support on embedded systems without X11.

(TODO: maybe move the EGL test out of the X11 tests at some point, too.)
2018-12-05 16:53:15 -05:00
Ryan C. Gordon
1689e9f910 linux: Move SDL_LinuxSetThreadPriority() elsewhere to fix build.
Fixes Bugzilla #4393.
2018-12-05 16:51:22 -05:00
Ryan C. Gordon
bd3ee07c83 wayland: Send SDL_TOUCH_MOUSEID mouse events for touches. 2018-12-05 16:49:38 -05:00
Sylvain Becker
6259a72636 Warnings: fix a documentation warning and missing prototypes 2018-12-05 16:13:12 +01:00
Sam Lantinga
db320e460a Fixed the PS4 motion controls showing up as a separate game controller on Linux 2018-12-04 14:21:29 -08:00
Sylvain Becker
09b462044f Windows: NEON detection and intrinsic includes on Visual Studio
Visual Studio doesn't define __ARM_ARCH nor _ARM_NEON, but _M_ARM and _M_ARM64,
so SDL_HasNEON() was bypassed.

PF_ARM_NEON_INSTRUCTIONS_AVAILABLE doesn't see to be defined (but still works
 when defined as 19).
2018-12-04 16:50:31 +01:00
Sylvain Becker
aea7e56a24 android: use __ARM_NEON instead of __ARM_NEON__ to include <arm_neon.h>
Only __ARM_NEON is defined with Android NDK and arm64-v8a
Tested on ndk-r18, ndk-r13 and also Xcode.
(Visual Studio needs a different fix).

Fixes Bugzilla #4409.
2018-12-04 12:34:45 +01:00
Ryan C. Gordon
cca9d24cde direct3d: be more aggressive about resetting invalidated cached state.
Fixes Bugzilla #4402.
2018-12-03 09:26:05 -05:00
Ryan C. Gordon
939bf1c4d8 render: fix some static analysis warnings. 2018-12-03 02:06:17 -05:00
Ryan C. Gordon
33f78eb163 direct3d: Make sure streaming textures update before being used for drawing.
Fixes Bugzilla #4402.
2018-12-03 01:58:23 -05:00
Ryan C. Gordon
b744108af8 Patched to compile on C89 compilers. 2018-12-02 21:57:33 -05:00
Ryan C. Gordon
3c9361509b direct3d: Release and NULL out vertex buffers on reset.
Otherwise they are irretrievably lost on window resize, etc, which makes
rendering freeze and other disasters.

Fixes Bugzilla #4358.
2018-12-02 20:55:57 -05:00
Ryan C. Gordon
65a7c98c6f directfb: Updated render backend to new internal API.
Totally untested, beyond it now compiles again. Probably needs some fixes.

Fixes Bugzilla #4405.
2018-12-02 02:33:06 -05:00
Sergey Zhuravlevich
583f61b202 kmsdrm: Check for resources when validating KMSDRM device in check_modesetting.
Fixes Bugzilla #4403.
2018-12-01 16:31:56 -05:00
Sergey Zhuravlevich
b3ac87d559 kmsdrm: uninitialized KMSDRM fixes
* Search for valid encoder in connector when it doesn't have an
   encoder ID set.

 * Search for valid CRTC in resources and encoder's possible CRTCs
   when encoder doesn't have one set.

 * Select default mode if CRTC doesn't have a valid one.

 * Pick current_mode's W/H/Refresh Rate basing on current and
   valid CRTC mode, not the saved one.
2018-12-01 13:09:00 -05:00
Ryan C. Gordon
3323b355c9 android: use cpufeatures to support SDL_HasNEON() (thanks, Sylvain!).
Fixes Bugzilla #4406.
2018-12-01 12:19:11 -05:00