Commit Graph

6527 Commits (80cf8a8b763eba400abac4de934063267d93301f)

Author SHA1 Message Date
Manuel Alfayate Corchete a3262205b5 kmsdrm: rearrange init function so we try ATOMIC compatibility first. 2020-10-22 17:55:45 +02:00
Manuel Alfayate Corchete b1ea0be865 kmsdrm: Add missing checks after SDL_calloc() calls. 2020-10-22 17:06:34 +02:00
Manuel Alfayate Corchete ad9ec8b363 kmsdrm: Small fix, missing bracket. 2020-10-22 16:15:34 +02:00
Manuel Alfayate Corchete 87a86675ed kmsdrm: Always use spaces for indentation. Always use SDL_calloc() for calloc. 2020-10-22 16:01:51 +02:00
Ozkan Sezer cfc1362011 os2 video: updates to my_gradd.h 2020-10-21 23:28:02 +03:00
Sam Lantinga f1b603ac6a Fixed bug 5323 - SDL_SetWindowMaximumSize fails if Width or Height is equal to minimum Height or Width
batyastudios

Basicly there is problem and somewhat a solution: https://discourse.libsdl.org/t/setwindowmaximumsize-bug/28267

If you SDL_SetWindowMaximumSize() after SDL_SetWindowMinimumSize() with one of axes have the same value, function will have no effect.

This: (line 2144@SDL_video.c)
if (max_w <= window->min_w || max_h <= window->min_h) {
    SDL_SetError("SDL_SetWindowMaximumSize(): Tried to set maximum size smaller than minimum size");
    return;
}

May be changed to this:
if (max_w < window->min_w || max_h < window->min_h) {
    SDL_SetError("SDL_SetWindowMaximumSize(): Tried to set maximum size smaller than minimum size");
    return;
}
2020-10-20 11:51:23 -07:00
Ozkan Sezer cbadd1e380 geniconv/os2iconv.c: make it build correctly against os2tk headers. 2020-10-20 20:32:20 +03:00
Manuel V?gele 554037a6f7 audio: fix popping sounds caused by signed/unsigned conversion
When converting audio from signed to unsigned values of vice-versa
the silence value chosen by SDL was the value of the device, not
of the stream that the data was being put into. After conversion
this would lead to a very high or low value, making the speaker
jump to a extreme positon, leading to an audible noise whenever
creating, destroying or playing scilence on a device that reqired
such conversion.
2020-09-26 09:30:08 +02:00
Sam Lantinga f311e0a826 Removed debug log message 2020-10-19 17:29:16 -07:00
Yiding Jia f31ad57fde Implement keyboard repeat in wayland video driver 2020-10-05 19:17:52 -07:00
Alberts Muktup?vels 73010da4dc x11events: ignore UnmapNotify events from XReparentWindow
UnmapNotify event does not mean that window has been iconified. It
just reports that window changed state from mapped to unmapped.

XReparentWindow can unmap and remap window if it was mapped. This
causes unnecessary events - HIDDEN, MINIMIZED, RESTORED and SHOW.

These events are problematic with Metacity 3.36+ which started to
remove window decorations from fullscreen windows.

- SDL makes decorated window fullscreen
- Metacity removes decorations
- SDL gets UnmapNotify and exits from fullscreen
- Metacity re-adds decorations

As SDL will also get MapNotify event it will try to restore
window state causing above steps to repeat.

https://bugzilla.libsdl.org/show_bug.cgi?id=5314
2020-10-19 17:26:33 -07:00
Ozkan Sezer e37a9385e2 Makefile.os2: remove duplicated OPTION QUIET directives from linker file 2020-10-19 04:33:03 +03:00
Sylvain Becker ffb307e4dc Fixed bug 5304 - add SDL_HasSurfaceRLE() (Thanks Rene Dudfield and Dan Lawrence) 2020-10-18 09:52:56 +02:00
Sylvain Becker 19a65a46a6 Fixed bug 5321 - crash in SDL_ConvertSurface with RLE surfaces
keep RLE information in flags when converting the surface
2020-10-17 21:47:05 +02:00
Ozkan Sezer c70191d2b7 SDL_os2video.c (OS2_CreateDevice): remove duplicated assignment. 2020-10-17 07:37:00 +03:00
Ozkan Sezer 77d0f043e5 os2video.c: add missing FOURCC_R666 define, enable FOURCC_R666 case in _getSDLPixelFormatData(). 2020-10-16 23:50:00 +03:00
Sam Lantinga 99ed0d7ab9 Map the guide button by default on Android 11 2020-10-16 12:40:12 -07:00
Sam Lantinga 3755f6920f Added mapping for Xbox One S controller and PS4 controller on Android 11, including guide button 2020-10-16 12:40:10 -07:00
Sam Lantinga b8ed432c3e Added a note about Android 11 2020-10-16 12:35:30 -07:00
Sam Lantinga df52c50434 Backed out changeset 2f59f1264083 2020-10-16 09:45:40 -07:00
Ozkan Sezer 52b319fec9 minor update to os/2 config file and update.
binary (dll) output doesn't change.
2020-10-16 02:50:10 +03:00
Sam Lantinga 58976bda31 Allow more than one window on iOS as long as they're on different displays 2020-10-15 12:00:15 -07:00
Ozkan Sezer a90f0400a5 os2: a _lot_ of coding style cleanup, sot that they match the SDL style.
also renamed the 'debug' macro to debug_os2: the former was dangerously
a common name.

the binary (dll) output is precisely the same as before.
2020-10-15 21:37:30 +03:00
Sam Lantinga bdc5129f13 Use a high priority dispatch queue for GCKeyboard and GCMouse events for the lowest latency possible
This appears to reduce latency between 1-4 ms on an iPad Pro.
2020-10-15 10:13:46 -07:00
Sam Lantinga a3a0ef7527 Added support for low latency mouse and keyboard handling in iOS 14
The mouse support in iOS 14.0 has a bug with accumulating duplicate mouse deltas that won't be fixed until iOS 14.1, so we don't enable it until then.
2020-10-15 10:13:44 -07:00
Sam Lantinga d9aea0c3a0 Update the existing haptic player when we rumble on iOS 2020-10-15 10:13:42 -07:00
Sam Lantinga 645a3280ec Fix iOS and tvOS builds
- Fix iOS and tvOS scheme names

- Add iOS/tvOS Developer signing identities and development team to iOS and
  tvOS shared library schemes
2020-10-15 10:13:40 -07:00
Manuel Alfayate Corchete cca16c9cb1 kmsdrm: merge GetDisplayDPI implementation by bms20 <brett@mynah-software.com> 2020-10-15 17:56:19 +02:00
Ozkan Sezer d27238751f os2: integrate the port into main tree. 2020-10-14 23:01:06 +03:00
Ozkan Sezer 20db1471e5 added documentation docs/README-os2.md (based on original readme.os2). 2020-10-14 23:01:06 +03:00
Ozkan Sezer 5807cb3d31 os2: remove dependency to gradd.h from IBM's ddk which is non-free:
Add a minimal my_gradd.h containing structures and constants only used
by SDL_os2vman.c -- based on public knowledge from around the internet
including pages from http://www.osfree.org and http://www.edm2.com .
2020-10-14 23:01:06 +03:00
Ozkan Sezer b6965a1774 os2: Andrey Vasilkin agreed that his code to be put under Zlib license:
add SDL license headers to geniconv sources.
2020-10-14 23:01:05 +03:00
Ozkan Sezer 1d9cf23e4c os2: updated copyright dates for 2020. header guard fixes. 2020-10-14 23:01:05 +03:00
Ozkan Sezer a3d7913c07 SDL_os2audio.c (OS2_OpenDevice): change spec->samples assignment:
Original code assigned MCIMixSetup.ulSamplesPerSec value to it, but it
is just the freq... We now change spec->samples only either if it is 0
or we changed the frequency, by picking a default of ~46 ms at desired
frequency (code taken from SDL_audio.c:prepare_audiospec()).

With this, the crashes I have been experiencing are gone.
2020-10-14 23:01:05 +03:00
Ozkan Sezer e112b776fc SDL_os2audio.c (OS2_OpenDevice): change {0} initializers to SDL_zero() 2020-10-14 23:01:05 +03:00
Ozkan Sezer 72594e255a SDL_os2audio.c (OS2_OpenDevice): remove assignment to wrong spec member
Correct assignment to 'format' member is done below, already.
2020-10-14 23:01:04 +03:00
Ozkan Sezer fe2cc8d86c OS2_VideoQuit(): avoid double free()ing of displays.
Our caller SDL_VideoQuit() already frees display_modes, driverdata, etc.
Noticed in bitwiseworks' version at https://github.com/bitwiseworks/SDL2-os2
2020-10-14 23:01:04 +03:00
Ozkan Sezer fba32ee21f OS2_VideoInit: zero the stSDLDisplay and stSDLDisplayMode variables
Fixes testdisplayinfo.exe crashing in SDL2-2.0.13.  (How it did work before?..)
2020-10-14 23:01:04 +03:00
Ozkan Sezer 54ced668c4 port from 2.0.12 to 2.0.13 / current SDL-hg repository.
- video:  VideoBootStrap->available() is gone.
- thread: all important SDL_CreateThread internal data now put into
          struct SDL_Thread: changes to SDL_SYS_CreateThread().
2020-10-14 23:01:04 +03:00
Ozkan Sezer 5da796fe52 os/2: port from SDL2-2.0.5 to SDL2-2.0.12
- events / video: SDL_SetDoubleClickTime() removed -- functionality
         moved to SDL_mouse.c:SDL_MouseDoubleClickTimeChanged().
- video: struct SDL_VideoDevice-> CreateWindow and CreateWindowFrom
         members renamed to CreateSDLWindow and CreateSDLWindowFrom
2020-10-14 23:01:03 +03:00
Ozkan Sezer 5d89217f6b os2/SDL_sysfilesystem.c: fix crash if one of the parameters is NULL
Has been happening with testfilesystem from 2.0.6 and newer because
of commit 572a721879ef.

Also set error strings in certain error conditions.

Also applied coding style / whitespace fixes, while I was there.
2020-10-14 23:01:03 +03:00
Ozkan Sezer 222f026899 os/2: port from SDL2-2.0.4 to SDL2-2.0.5:
changes to SDL_os2audio.c, SDL_os2video.c, os2/SDL_systhread.c in order
to accomodate SDL2-2.0.5 changes.
- audio:  WaitDone() is gone, CloseDevice() interface changes.
- events / video:  DropFile() changes:
          SDL_DROPBEGIN and SDL_DROPCOMPLETE events, window IDs for drops.
- thread: struct SDL_Thread->stacksize
2020-10-14 23:01:03 +03:00
Ozkan Sezer 5f3f67b16b os2/SDL_sysfilesystem.c: use OS/2 api DosCreateDir() instead of mkdir().
mkdir() from watcom and emx differ - the latter being unix-ish, so this
change avoids ifdefs.
2020-10-14 23:01:03 +03:00
Ozkan Sezer 4551c63372 os2: make testnative working -- imported from bitwiseworks' fork:
e2abc76b24
2020-10-14 23:01:02 +03:00
Ozkan Sezer 1b99d805db os2: updates from Andrey Vasilkin's 2020-09-07 sources. 2020-10-14 23:01:02 +03:00
Ozkan Sezer aa790837eb os2: several warning fixes.
mostly those "W007: '&array' may not produce intended result" warnings
from Watcom, visible only in C++ mode.  one or two others here & there.
2020-10-14 23:01:02 +03:00
Ozkan Sezer f9af19f51d os2: updates to SDL_systhread.c:
removed lots of garbage.  added SDL_PASSED_BEGINTHREAD_ENDTHREAD guard,
because the code requires it.
2020-10-14 23:01:02 +03:00
Ozkan Sezer c218861946 os2: added a 2-byte padding to os2 SDL_PrivateAudioData 2020-10-14 23:01:01 +03:00
Ozkan Sezer d1323eb0a9 os2: better error reporting from loadso 2020-10-14 23:01:01 +03:00
Ozkan Sezer 861ac81b37 os2: changes to debug macros 2020-10-14 23:01:01 +03:00