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
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
Ozkan Sezer
110a0f7bb1
os2: update include paths. add missing libc includes to geniconv.
2020-10-14 23:01:01 +03:00
Ozkan Sezer
74cfb81dbb
os2: add port files for SDL2-2.0.4 from Andrey Vasilkin
...
only geniconv/iconv.h (was from LGPL libiconv) is replaced with a generic
minimal iconv.h based on public knowledge.
2020-10-14 23:01:00 +03:00
Ozkan Sezer
93e1449764
SDL_waylanddatamanager.c (mime_data_list_add): constify the buffer param
...
Fixes -Wdiscarded-qualifiers warnings from Wayland_data_source_add_data()
2020-10-14 15:50:04 +03:00
Sam Lantinga
b9cbea354f
video: Refresh Windows display list on WM_DISPLAYCHANGE
...
- Displays may have been added, removed or changed and all cached monitor
handles are invalidated as a result.
- Display events are handled in three steps:
1. Mark all currently know displays as invalid
2. Enumerate all displays, adding new ones and marking known displays as valid
3. Remove all displays still invalid after enumeration
- Display connect/disconnect events are sent when displays are added or removed
after initial setup
2020-10-13 21:08:20 -07:00
Sam Lantinga
a558409b2e
Only include CoreHaptics if we're building with rumble support
2020-10-13 21:08:18 -07:00
Sam Lantinga
75d5be974c
Fixed compiling with an older iOS SDK
2020-10-13 21:08:17 -07:00
Sam Lantinga
6b62494ee4
Added support for controller battery status on iOS 14
2020-10-13 21:08:15 -07:00
Sam Lantinga
1b31e9f6dc
Added support for game controller rumble on iOS 14
2020-10-13 21:08:13 -07:00
Sam Lantinga
2d7b33cb41
Added support for the controller home button on iOS 14
2020-10-13 21:08:11 -07:00
Cameron Cawley
59022829f4
riscos: Implement SDL_OpenURL()
2020-10-11 17:32:32 +01:00
Ozkan Sezer
34a82fca49
SDL_cpuinfo.c (OS2): undefine HAVE_SYSCTLBYNAME
2020-10-10 20:50:02 +03:00
Sam Lantinga
b546db2f85
Only watch for display connect/disconnect events while the video subsystem is initialized
2020-10-09 12:58:28 -07:00
Ozkan Sezer
7991cc38bc
dynapi: move SDL_SIMDRealloc down below, after SDL_GetPreferredLocales.
...
https://hg.libsdl.org/SDL/rev/884cb29cb80e wrongly added it after its
family i.e. SDL_SIMDAlloc, not at the end of the list.
2020-10-09 21:40:28 +03:00
Ryan C. Gordon
b79832ba11
cocoa: Cut and paste from HTML strikes again!
2020-10-08 21:11:09 -04:00
Ozkan Sezer
19aaa2944d
Fix https://bugzilla.libsdl.org/show_bug.cgi?id=5306
...
(Also see: https://bugzilla.libsdl.org/show_bug.cgi?id=4822 )
Building the current tree against 10.8 SDK, clang emits the following warning:
src/video/cocoa/SDL_cocoawindow.m:1846:27: warning: instance method '-isOperatingSystemAtLeastVersion:' not found (return type defaults to 'id') [-Wobjc-method-access]
![processInfo isOperatingSystemAtLeastVersion:version]) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSProcessInfo.h:20:12: note: receiver is instance of class declared here
@interface NSProcessInfo : NSObject {
^
1 warning generated.
isOperatingSystemAtLeastVersion is an 10.10 thing.
2020-10-09 04:00:00 +03:00
Ozkan Sezer
69fbd60d25
Fix https://bugzilla.libsdl.org/show_bug.cgi?id=4877#c2
...
loadNibNamed:owner:topLevelObjects is available on 10.8 and newer.
There is an issue report here about an app failing to function on
10.7 and earlier: https://discourse.libsdl.org/t/28179
2020-10-09 04:00:00 +03:00
Sam Lantinga
bd14f2676c
Removed unused variable
2020-10-08 16:58:34 -07:00
Ozkan Sezer
d86a746542
SDL_video.c: fix whitespace
2020-10-09 02:55:00 +03:00
Sam Lantinga
76980e30f2
Added events for dynamically connecting and disconnecting displays, with an iOS implementation
2020-10-08 16:42:20 -07:00
Sam Lantinga
cd703b5628
Fixed whitespace
2020-10-08 16:41:48 -07:00
Ozkan Sezer
54bb9aaccb
k_rem_pio2.c: fix typo in second memset(): iq, not q. fixes bug #5309 .
2020-10-08 11:51:02 +03:00
Ryan C. Gordon
061256a3b3
metal: Clear the framebuffer if presenting without any other operations.
2020-10-07 14:45:24 -04:00
Ryan C. Gordon
003a16980c
wav: Make sure the data size is a multiple of blockalign, not an exact match.
...
I _think_ this is a right thing to do; it fixes a .wav file I have here that
has blockalign==2 when channels==2 and bitspersample==16, which otherwise
would fail.
2020-10-06 11:07:50 -04:00
Ryan C. Gordon
4627426994
url: WinRT actually works now (and has been tested, hooray!).
2020-10-06 00:42:17 -04:00
Ryan C. Gordon
fc05a696ad
url: Attempt #23235 at WinRT support...
2020-10-05 18:08:58 -04:00
Ryan C. Gordon
02addf135d
url: Another attempt at WinRT implementation.
2020-10-05 18:01:47 -04:00
Ozkan Sezer
1f4b5d54ca
windows/SDL_syslocale.c: make it build against older SDKs.
2020-10-06 00:20:20 +03:00
Ryan C. Gordon
7bec9df11a
url: Add to Xcode project files, iOS/mac fixes.
2020-10-05 16:10:10 -04:00
Ryan C. Gordon
57e3003d3f
url: Attempt at WinRT support.
2020-10-05 15:47:47 -04:00
Ryan C. Gordon
566479c8ef
url: ShellExecuteW returns an HINSTANCE, so deal with that more correctly.
2020-10-05 15:37:37 -04:00
Ryan C. Gordon
ee56090d3d
url: Cleanups and compiler warning fixes.
2020-10-05 15:03:44 -04:00
Ryan C. Gordon
cc158f2983
url: removed "extern" from function declaration.
2020-10-05 14:36:37 -04:00
Ryan C. Gordon
a3802cc533
url: Patched to compile on C89 compilers.
2020-10-05 14:30:33 -04:00
Ryan C. Gordon
0099e38a9a
url: More win32 fixes.
2020-10-05 14:21:03 -04:00
Ryan C. Gordon
1f4fecc5c1
url: Patched to compile on Windows.
2020-10-05 14:07:32 -04:00
Ryan C. Gordon
777d0f19f8
url: patched to compile on macOS.
2020-10-05 14:06:25 -04:00
Ryan C. Gordon
d068d05aa5
url: Make sure Haiku's C++ implementation is flagged as 'extern "C"'
2020-10-05 14:01:08 -04:00