Commit Graph

7427 Commits

Author SHA1 Message Date
Ash
bfb51a0f00 audio: Add *very* early wiiu audio support 2019-04-29 22:55:54 +10:00
rw-r-r-0644
70f923cc91 input/wiiu: switch back to VPADGetTPCalibratedPoint 2019-04-29 22:55:54 +10:00
rw-r-r-0644
30a8901587 threads/wiiu: fix crash on SDL_SYS_CreateThread: pass stack top and not stack bottom 2019-04-29 22:55:54 +10:00
rw-r-r-0644
6ea16de7c6 threads/wiiu: remove unused SDL_mutex structure definition and only build when requested 2019-04-29 22:55:54 +10:00
rw-r-r-0644
189846753c threads/wiiu: implement SDL_CondWaitTimeout 2019-04-29 22:55:54 +10:00
rw-r-r-0644
30b0133f83 threads/wiiu: add sysmutex_c.h header 2019-04-29 22:55:54 +10:00
rw-r-r-0644
5554ca04a8 threads/wiiu: add generic thread storage 2019-04-29 22:55:54 +10:00
rw-r-r-0644
494e81f4a9 threads/wiiu: add semaphores 2019-04-29 22:55:54 +10:00
rw-r-r-0644
bbb8f558cc wiiu/input: Use raw for touchscreen and check for VPADRead errors 2019-04-29 22:55:54 +10:00
rw-r-r-0644
cbefaaa74a Rewrite wiiu joystick driver to better match switch's and add touchscreen support 2019-04-29 22:55:54 +10:00
rw-r-r-0644
856e271d2a Do not send SDL_QUIT from WIIU_PumpEvents: it causes crashes and isn't the right way to do it 2019-04-29 22:55:54 +10:00
rw-r-r-0644
5d221e72f1 Change shader include guard to match SDL 2019-04-29 22:55:54 +10:00
rw-r-r-0644
9b777c083d Switch to GX2!! (thanks to exjam for his help and toolchain and aliaspider for his shader!) 2019-04-29 22:55:54 +10:00
rw-r-r-0644
572c0e4021 Initial support for Nintendo WiiU 2019-04-29 22:55:53 +10:00
Sam Lantinga
0efec8ac7a Fixed bug 4188 - Software renderer SDL_RenderCopyEx blits corrupt image under certain cases
Sylvain

Re-opening this issue.

It fixes the test-case, but it introduces a regression with another bug (bug #4313).

So here's a new patch that activate cropping of the source surface to solve the issue.
It also reverts the wrong changeset.
It prevents unneeded colorkey error message.
2018-10-30 07:00:03 -07:00
Ryan C. Gordon
cea92252b1 winmain: Patched to compile on C89 compilers. 2018-10-29 20:18:50 -04:00
Ryan C. Gordon
4add225d98 winmain: Don't use SDL_malloc (or SDL_stack_alloc, which might be malloc).
Otherwise, we are using the allocator before the app can set up its own hooks.

Now we use VirtualAlloc, and WideCharToMultiByte (because SDL_iconv uses
SDL_malloc, too!) to get ready to call into SDL_main.

This also makes console_wmain() call into the same routines as everything
else, so we don't have to deal with those allocations, too. Hopefully we
end up with the same results from GetCommandLine() as we do in wargv.

Fixes Bugzilla #4340.
2018-10-29 20:00:03 -04:00
Michał Janiszewski
e4a84752cb Add and update include guards
Include guards in most changed files were missing, I added them keeping
the same style as other SDL files. In some cases I moved the include
guards around to be the first thing the header has to take advantage of
any possible improvements compiler may have for inclusion guards.
2018-10-28 21:36:48 +01:00
Sam Lantinga
b8ffbe177a 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
a404e5056f hidapi: Don't run a separate event loop for device notifications.
Fixes Bugzilla #4286.
2018-10-26 14:43:39 -04:00
Sam Lantinga
e6472f3cb3 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
da9d1fdad4 Generalized the XInput user index into a player index 2018-10-25 16:53:14 -07:00
Sam Lantinga
67832fdf10 Fixed initializing XInput user index 2018-10-25 13:22:34 -07:00
Sam Lantinga
e8f3a27057 Added SDL_JoystickGetXInputUserIndex() 2018-10-25 12:54:42 -07:00
Sam Lantinga
95bd760475 Added vi style for the Emscripten joystick code 2018-10-25 12:54:39 -07:00
Sam Lantinga
ddee9a366a Add exception handling to Android hidapi. 2018-10-22 14:55:42 -07:00
Ryan C. Gordon
135273d029 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
d47f7c3505 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
32bec112ae 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
Thomas Perl
95ea2ed177 Fix "unresponsible application" issues in Wayland
Polling without wl_display_flush() never responds to ping requests.
In that case ping-pong works only on other events, such as user input
or on frame swapped.

From https://git.merproject.org/mer-core/libsdl/merge_requests/3
Original author: Alexander Akulich <a.akulich@omprussia.ru>
2018-08-23 14:47:38 +02:00
Ryan C. Gordon
1da5ad6607 cocoa: Fix OpenGL rendering on macOS 10.14 ("Mojave").
Fixes Bugzilla #4272.
2018-10-18 12:05:05 -04:00
Ryan C. Gordon
92b1ddcd15 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.
2018-10-18 11:59:48 -04:00
Sam Lantinga
3c0f019a28 Fixed updating the rumble parameters on Linux 2018-10-16 14:58:07 -07:00
Sam Lantinga
1862fedebb Support vibration magnitude on Android 8.0 (thanks Rachel!) 2018-10-16 08:29:27 -07:00
Ozkan Sezer
f311b08642 SDL_power.c: Adjust SDL_POWER_DISABLED ifdefs to avoid zero-size array
Otherwise if SDL_POWER_DISABLED is disabled (eg with --disable-power):

... with clang -pedantic:
src/power/SDL_power.c:48:50: warning: use of GNU empty initializer extension [-Wgnu-empty-initializer]
static SDL_GetPowerInfo_Impl implementations[] = {
                                                 ^
src/power/SDL_power.c:48:50: warning: zero size arrays are an extension [-Wzero-length-array]
2 warnings generated.

... with gcc -pedantic:
src/power/SDL_power.c:48:50: warning: ISO C forbids empty initializer braces [-Wpedantic]
src/power/SDL_power.c:48:50: warning: ISO C forbids empty initializer braces [-Wpedantic]
 static SDL_GetPowerInfo_Impl implementations[] = {
                                                  ^
src/power/SDL_power.c:48:30: error: zero or negative size array ‘implementations’
 static SDL_GetPowerInfo_Impl implementations[] = {
                              ^~~~~~~~~~~~~~~

... with Watcom:
./src/power/SDL_power.c(85): Error! E1112: Initializer list cannot be empty
2018-10-15 11:01:00 +03:00
Ryan C. Gordon
7d558cc0de x11: Don't hardcode limit on lines of text in message boxes.
Plus other text parsing fixes.

Fixes Bugzilla #4306.
2018-10-15 00:46:43 -04:00
Ozkan Sezer
30ee716f69 SDL_GetPowerInfo_Hardwired is static in SDL_power.c
.. therefore, comment out its extern declaration in SDL_syspower.h.
2018-10-14 23:55:02 +03:00
Ozkan Sezer
651d5e7d28 add missing include. 2018-10-14 23:50:50 +03:00
Alex Szpakowski
b669a6546f iOS: Don't ignore the requested alpha bit size when determining whether to use an RGBA8 backbuffer. 2018-10-14 17:26:10 -03:00
Charlie Birks
da8a1e0ebc Emscripten: Load eglQueryString and eglGetError
This prevents an assertion on context creation failure (calling a null
function pointer).
2018-10-13 17:18:59 +01:00
Alex Szpakowski
18b397b215 metal: Fix SDL_RenderReadPixels to wait for the GPU to finish rendering to the active texture before reading its pixels. 2018-10-13 03:36:42 -03:00
Alex Szpakowski
a7fd679c7e macOS: Fixed MoltenVK dynamic library loading code. 2018-10-12 23:23:52 -03:00
Alex Szpakowski
c13bc99b59 metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250. 2018-10-12 17:55:42 -03:00
Sam Lantinga
0043547514 Allow Android haptics to work when SDL is reinitialized (thanks Rachel!) 2018-10-11 15:14:48 -07:00
Ryan C. Gordon
0ba20a58d2 thread: make SDL_CreateThreadWithStackSize() a public API. 2018-10-11 16:40:01 -04:00
Cameron Gutman
cdff8bd687 Implement SuspendScreenSaver for Win32
Creating a full-screen SDL renderer on Windows will keep the screensaver
suspended by DirectX, as is default for full-screen DX applications. However,
for applications that render in windowed-mode, the screensaver will
still kick in, even if SDL_DisableScreenSaver() is called or
SDL_HINT_VIDEO_ALLOW_SCREENSAVER is set to 0 (default). Implementing
a SuspendScreenSaver() function for Win32 fixes this behavior.
2018-10-09 23:01:43 -07:00
Ryan C. Gordon
5c738788f3 audio: All device names reported by SDL must be unique.
This means that if you have two devices named "Soundblaster Pro" in your
machine, one will be reported as "Soundblaster Pro" and the other as
"Soundblaster Pro (2)".

This makes it so you can't into a position where one of your devices can't
be opened because another is sitting on the same name.
2018-10-10 15:20:56 -04:00
Ryan C. Gordon
b6e444f3dd audio: clean_out_device_list() already sets this flag to false for us. 2018-10-10 14:55:24 -04:00
Sam Lantinga
4f85986c8e Added support for surround sound and float audio on Android 2018-10-09 20:12:43 -07:00
Sam Lantinga
98d5b10188 Fixed bug 4188 - Software renderer SDL_RenderCopyEx blits corrupt image under certain cases
duckgrease

SDL_RenderCopyEx blits wrong image (in some cases it's bunch of alternating horizontal lines, some cases it's image from the wrong coordinate, and in some cases it's just a bunch of garbled pixels), when the following conditions are met:
- Use software renderer.
- Enable either horizontal or vertical flip.
- source and destination rectangles must have same width and height, and must be smaller than the size of the texture.
- source rectangle's X and Y coordinates must be 0.
2018-10-09 17:41:40 -07:00