Ozkan Sezer
bc9888c9b5
OS2_GetDisplayModes: malloc a new copy of mode's driver data.
...
Based on a patch by Jochen Schäfer <josch1710@live.de > :
The problem is, that in the initialization code uses the same structure for
desktop_mode and current_mode. See SDL_os2video.c:OS2_VideoInit():
stSDLDisplay.desktop_mode = stSDLDisplayMode;
stSDLDisplay.current_mode = stSDLDisplayMode;
...
stSDLDisplayMode.driverdata = pDisplayData;
Then, if you call GetDisplayModes, current_mode will added to the modes
list, with the same driverdata pointer to desktop_mode.
SDL_AddDisplayMode( display, &display->current_mode );
When VideoQuit gets called, first the modes list gets freed including the
driverdata, the desktop_mode gets freed. See SDL_video.c:SDL_VideoQuit():
for (j = display->num_display_modes; j--;) {
SDL_free(display->display_modes[j].driverdata);
display->display_modes[j].driverdata = NULL;
}
SDL_free(display->display_modes);
display->display_modes = NULL;
SDL_free(display->desktop_mode.driverdata);
display->desktop_mode.driverdata = NULL;
So, the display_modes[j].driverdata gets freed, but desktop_mode->driverdata
points to the same memory, but is not NULL'ed. When desktop_mode->driverdata
gets freed the memory is already freed, and libcx crashes the application on
SDL_Quit.
2021-06-12 14:55:24 +03:00
Ozkan Sezer
d28437de3c
SDL_keyboard.c: Add bounds guards when assigning to the scancode array.
...
Based on a patch by Jochen Schäfer <josch1710@live.de > :
On a T420 pressing the ACPI button for volume control, big scancodes
were emitted. This was causing an overflow, because missing guards.
2021-06-12 08:00:50 +03:00
Ozkan Sezer
2f248a2a31
SDL_cocoaevents.m: fix build against SDK < 10.12 after commit 0dd7024d.
2021-06-11 04:00:32 +03:00
Ozkan Sezer
37b093eaf2
test/checkkeysthreads: build fixes, and add to os2 makefile.
2021-06-05 00:05:56 +03:00
Ozkan Sezer
f498c281e1
fixed build with SDL_JOYSTICK_RAWINPUT enabled after commit b81969d46f
...
See: https://github.com/libsdl-org/SDL/pull/4388#issuecomment-852713792
2021-06-02 14:10:50 +03:00
Ozkan Sezer
75725608f3
SDL_thread.h: move libc header includes before begin_code.h.
2021-05-25 14:56:56 +03:00
Ozkan Sezer
7a7cba4b73
config.guess, config.sub: fix permissions
2021-05-25 14:56:37 +03:00
Ozkan Sezer
c63a62ae49
updates to config.guess and config.sub from mainstream.
2021-05-18 23:51:50 +03:00
Ozkan Sezer
b5b7804ed4
minor update to os2 makefile. (binary output doesn't change.)
2021-05-15 00:50:20 +03:00
Ozkan Sezer
646ddfb782
minor watcom build fixes.
2021-05-15 00:22:50 +03:00
Ozkan Sezer
58884e4c1b
SDL_audiocvt.c: fixed MSVC double->float conversion warnings.
2021-05-04 00:23:40 +03:00
Ozkan Sezer
227021b647
SDL_windowsmessagebox.c (MessageBoxDialogProc): fix calling convention.
2021-04-30 11:25:20 +03:00
Ozkan Sezer
89a2980a6d
CMake: fixes to pthreads detection.
...
changes unnecessary check_c_source_runs to check_c_source_compiles,
removes the reduntant cross-compile check, and defines _GNU_SOURCE
for PTHREAD_MUTEX_RECURSIVE checks just like the autotools version.
Fixes: https://github.com/libsdl-org/SDL/issues/4262
Closes: https://github.com/libsdl-org/SDL/pull/4282
2021-04-25 01:28:03 +03:00
Ozkan Sezer
babd79b8ef
bump minimum required autoconf version and revise autogen.sh
2021-04-14 23:20:40 +03:00
Ozkan Sezer
69203851dc
rename PKG_CONFIG_LIBS_PRIV to PKGCONFIG_LIBS_PRIV
...
i.e.: do not steal PKG_CONFIG namespace.
2021-04-14 21:40:50 +03:00
Ozkan Sezer
197cfcaf71
ran configure.ac through autoupdate-2.69
...
generated configure script is practically the same except for whitespace
changes.
2021-04-14 21:10:40 +03:00
Ozkan Sezer
e97cfe4ad1
KMSDRM_Vulkan_CreateSurface(): fixed pointer-cast warning on 32 bit
...
Closes: https://github.com/libsdl-org/SDL/issues/4284
2021-04-06 23:56:10 +03:00
Ozkan Sezer
573c5a5bac
regenerated configure.
2021-04-04 11:55:50 +03:00
Ozkan Sezer
5262b52ddd
SDL_kmsdrmvideo.c: define EGL_PLATFORM_GBM_MESA if it's missing.
...
Fixes: https://github.com/libsdl-org/SDL/issues/4232
2021-03-25 23:56:56 +03:00
Ozkan Sezer
e5821bf276
regenerated configure.
2021-03-18 00:10:00 +03:00
Ozkan Sezer
b49e0953b1
regenerated configure
2021-03-14 14:10:50 +03:00
Ozkan Sezer
1957ffd21a
fixed a typo in SDL_ceilf()
2021-03-14 11:04:28 +03:00
Ozkan Sezer
9d46bd25c7
revert commit 81cdb1bb0d (unifont license issue.)
2021-03-11 17:00:10 +03:00
Ozkan Sezer
bd06538778
configure: fix wrong AS_HELP_STRING quoting.
2021-03-08 17:02:28 +03:00
Ozkan Sezer
a7938107ae
fix SDLK_DELETE after commit 2f5beac190
2021-03-06 11:28:04 +03:00
Ozkan Sezer
686935542e
dos2unix SDL_dynapi_*.h
2021-03-04 23:50:40 +03:00
Ozkan Sezer
34ecd71e80
CMake: don't add -Wl,--no-undefined to LDFLAGS for clang+windows cases
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:44:04 +03:00
Ozkan Sezer
3880174a9f
CMake: set OPT_DEF_LIBC to ON for clang case, too.
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:40:56 +03:00
Ozkan Sezer
05cc9e3764
CMake: move GCC check after CLANG, so that CLANG is properly recognized
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:40:50 +03:00
Ozkan Sezer
81cdb1bb0d
test: add unifont-9.0.02.hex as a resource (so it works out-of-the-box)
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:32:32 +03:00
Ozkan Sezer
a52d0db532
test/CMakeLists.txt: add OpenGL module checks and adjust dependencies.
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:28:10 +03:00
Ozkan Sezer
e7abf96801
test/CMakeLists.txt: bump cmake minimum required to 3.0 for consistency
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:28:04 +03:00
Ozkan Sezer
dd5aff308a
SDL_fillrect.c: updated SSE_BEGIN macro for windows clang-cl
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:27:56 +03:00
Ozkan Sezer
0ed1713128
update SDL_COMPOSE_ERROR macro for windows clang-cl
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:27:47 +03:00
Ozkan Sezer
e228d15261
SDL_config_windows.h: added clang to list of toolchains having stdint.h
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:27:37 +03:00
Ozkan Sezer
c1c4f274c3
cpuinfo: updated xgetbv call for windows clang-cl.
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:27:32 +03:00
Ozkan Sezer
ac8a3fda8f
fix prepare_audiospec() possibly missing a bad SDL_AUDIO_CHANNELS env.
2021-03-03 20:33:20 +03:00
Ozkan Sezer
0a68322170
add missing PIPEWIRE defines to SDL_config.h.in
...
also specify 'audio' in Pipepire configuration enable messages.
2021-03-01 15:11:50 +03:00
Ozkan Sezer
72f7a10cef
disable pixman ARM blitters for __aarch64__ | _M_ARM64
...
Closes: https://github.com/libsdl-org/SDL/issues/4095
2021-02-25 11:38:14 -08:00
Ozkan Sezer
e561ce3a75
SDL_cpuinfo.c: replaced gcc i386 checks with __i386__ .
2021-02-25 01:40:02 +03:00
Ozkan Sezer
55a385a333
removed a useless restriction from Watcom version of SDL_Swap32()
...
also did a little whitespace tidy-up.
2021-02-24 20:03:50 +03:00
Ozkan Sezer
b8d2185277
added Watcom i386 inline asm for SDL_Swap64()
2021-02-23 17:37:20 +03:00
Ozkan Sezer
b3498a5dc2
make SDL_syswm.h work with apple's older gcc versions
...
c.f. https://bugzilla.libsdl.org/show_bug.cgi?id=2694
2021-02-22 15:50:02 +03:00
Ozkan Sezer
bb76edf3d7
fix permissions of a few files
2021-02-22 15:44:32 +03:00
Ozkan Sezer
a29fe29296
configury: replace host checks against *-*-mingw32* with *-*-mingw*
2021-02-18 20:10:50 +03:00
Ozkan Sezer
f2a2d0c696
SDL_render_d3d.c: fix build with SDL_LEAN_AND_MEAN
2021-02-15 22:56:20 +03:00
Ozkan Sezer
bd4277ee39
fixed make dist (VisualC.html went bye bye..)
2021-02-15 20:10:50 +03:00
Ozkan Sezer
a2fbc452ca
replace i386 checks with __i386__
2021-02-15 03:02:32 +03:00
Ozkan Sezer
b34d92bf37
further .gitignore updates
2021-02-14 11:56:40 +03:00
Ozkan Sezer
0d92507d71
regenerated configure
2021-02-14 11:55:50 +03:00
Ozkan Sezer
2faa478325
further .gitignore updates
2021-02-14 11:55:24 +03:00
Ozkan Sezer
67a9d6ba98
updates to .gitignore
2021-02-13 20:50:24 +03:00
Ozkan Sezer
dc45a228b9
avoid some pedantic warnings in array initializers
2021-02-10 10:22:20 -05:00
Ozkan Sezer
bb9e049d1d
minor updates to libc function checks
2021-02-10 10:22:19 -05:00
Ozkan Sezer
091a4649e8
added --enable-xinput switch for windows builds
2021-02-10 10:22:18 -05:00
Ozkan Sezer
431b79cf34
SDL_config_os2.h: remove some duplicated lines.
2021-02-10 10:22:17 -05:00
Ozkan Sezer
582e1f4a1c
config.guess and config.sub updates from mainstream
2021-02-10 10:22:17 -05:00
Ozkan Sezer
87f0900701
SDL_LowerSoftStretchLinear: assign result from scale_mat() to ret.
...
otherwise it would always return -1 when SSE and NEON instrinsics
are absent.
2021-02-10 10:22:17 -05:00
Ozkan Sezer
aa4a6b0b88
better check for clock_gettime_nsec_np() -- cf. bug #5467 .
2021-02-10 10:22:16 -05:00
Ozkan Sezer
d327bbfbfd
CMakeLists.txt: fix check_symbol_exists() for clock_gettime_nsec_np
2021-02-10 10:22:16 -05:00
Ozkan Sezer
b852590ba5
minor clean-up in SDL_os2audio.c
2021-02-10 10:22:16 -05:00
Ozkan Sezer
fd65aaa9a8
move outdated winmm and psp joystick codes to struct _SDL_JoystickDriver
...
build-tested only. (bug #5472.)
2021-01-24 00:51:25 -05:00
Ozkan Sezer
8f1025899a
os2audio: changed backend name from MMOS2 to DART (like SDL-1.2)
2021-01-24 00:51:25 -05:00
Ozkan Sezer
2376458841
renamed SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H to SDL_HAVE_MACHINE_JOYSTICK_H
2021-01-24 00:51:25 -05:00
Ozkan Sezer
02e61a88fb
added SDL_JOYSTICK_OS2 to SDL_config.h.in and SDL_config.h.cmake
2021-01-24 00:51:25 -05:00
Ozkan Sezer
d0c5097cdc
minor autotools build system updates.
2021-01-24 00:51:25 -05:00
Ozkan Sezer
4eb2b9f809
fix permissions of config.guess and config.sub
2021-01-24 00:51:25 -05:00
Ozkan Sezer
11fce32162
SDL_dinputjoystick.c: fixes to dfDIJoystick2[] array from Wine git.
...
Fix V/A/FSlider dwOfs values in c_dfDIJoystick2
https://source.winehq.org/git/wine.git/commitdiff/af2f4194263702a946c65d255580176ee50b5914
Add missing ASPECT flags for c_dfDIJoystick2
https://source.winehq.org/git/wine.git/commitdiff/e2e100272ffede3c720da7bbd11b53ac0bcee8eb
Closes bug #5474 .
2021-01-24 00:51:25 -05:00
Ozkan Sezer
4a776557af
old os2 analogue joystick code ported from SDL-1.2. disabled by default,
...
build-tested only.
2021-01-24 00:51:25 -05:00
Ozkan Sezer
e91f83c1e0
hidapi.h: adjust so that it gives a smaller diff against mainstream
2021-01-24 00:51:25 -05:00
Ozkan Sezer
b6ae9a7cba
renamed my_gradd.h to SDL_gradd.h
2021-01-24 00:51:24 -05:00
Ozkan Sezer
07f83cd5a6
hidapi/libusb/hid.c: fix race condition on device close (bug #5484 )
...
From hidapi mainstream git: https://github.com/libusb/hidapi/issues/142
https://github.com/libusb/hidapi/commit/d2c3a9862eefe2d3f4db0f00c0238277bfb4e44b
Read callback may fire itself on its own even after its been requested
to stop and exactly before the calling code waits for its completion in
indefinite loop. Explicitly preventing re-fireing the submission loop
fixes the issue.
2021-01-24 00:51:24 -05:00
Ozkan Sezer
6393d14de5
SDL_virtualjoystick.c: remove wrong #endif comment.
2021-01-24 00:51:24 -05:00
Ozkan Sezer
327ea97436
hidapi/libusb/hid.c: whitespace tidy-up.
2021-01-24 00:51:24 -05:00
Ozkan Sezer
282558379e
fix AC_CHECK_HEADER for libusb.h
2021-01-24 00:51:24 -05:00
Ozkan Sezer
f3835702d3
fix build with --disable-directx
2021-01-24 00:51:24 -05:00
Ozkan Sezer
bdb3e6b84f
SDL_hidapi_switch.c: fix build with older compilers
2021-01-15 12:40:00 +03:00
Ozkan Sezer
8636bc06de
acinclude/libtool.m4: Apply macos11 patch from libtool bug #44605
...
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44605
https://github.com/macports/macports-ports/blob/master/devel/libtool/files/dynamic_lookup-11.patch
( Also see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44684 )
This also implicitly covers the macos10.10+ support patch from libtool
mainstream which has been in since libtool-v2.4.3, i.e.:
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commit;h=e145288b059e14ab7e58fc6a304e82d9dad282a6
2021-01-09 00:11:20 +03:00
Ozkan Sezer
29888bd69a
fixed permissions of xcode project file
2021-01-08 21:56:00 +03:00
Ozkan Sezer
8d3963421d
regenerated configure
2021-01-08 21:50:02 +03:00
Ozkan Sezer
e23666f63e
update config.guess and config.sub from mainstream.
2021-01-07 17:40:00 +03:00
Ozkan Sezer
dfb0afe36a
fix build after commit 5730b2005da1
2021-01-07 00:41:32 +03:00
Ozkan Sezer
dc0e5de974
Update config.guess and config.sub from mainstream.
...
Recognizes riscv32be and riscv64be.
2021-01-05 17:10:02 +03:00
Ozkan Sezer
76295cecf3
video/windows: ANSI/UNICODE updates (cf. bug 5435):
...
- explicitly use UNICODE versions of DrawText, EnumDisplaySettings,
EnumDisplayDevices, and CreateDC: the underlying structures have
WCHAR strings.
- change WIN_UpdateDisplayMode and WIN_GetDisplayMode() to accept
LPCWSTR instead of LPCTSTR for the same reason.
- change WIN_StringToUTF8 and WIN_UTF8ToString to the explicit 'W'
versions where appropriate.
2021-01-05 15:50:10 +03:00
Ozkan Sezer
265a1cc97a
use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed ( #2 )
...
cf. bug #5435 .
- SDL_wasapi_win32.c (GetWasapiDeviceName): pwszVal is WCHAR*
- windows/SDL_sysfilesystem.c (SDL_GetBasePath, SDL_GetPrefPath)
- windows/SDL_sysurl.c (SDL_SYS_OpenURL): wurl is WCHAR*
- SDL_windowssensor.c (ConnectSensor): bstr_name is WCHAR*
- windows/SDL_systhread.c (SDL_SYS_SetupThread): strw is WCHAR*
2021-01-05 15:50:02 +03:00
Ozkan Sezer
516042b4d6
ran gendynapi.pl after SDL_UpdateNVTexture addition
2021-01-05 15:15:50 +03:00
Ozkan Sezer
31751bdcce
wmmsg.h: constified wmtab
2021-01-05 15:15:37 +03:00
Ozkan Sezer
8cb421b26d
SDL_windows_main.c: use new WIN_StringToUTF8W macro
2021-01-04 10:20:10 +03:00
Ozkan Sezer
a594b85031
use WIN_StringToUTF8W macro instead of WIN_StringToUTF8, where needed:
...
i.e. where the string is known guaranteed to be WCHAR*, in:
- SDL_dinputjoystick.c (WIN_IsXInputDevice): VARIANT->var is BSTR (WCHAR*)
- SDL_rawinputjoystick.c (RAWINPUT_AddDevice): string is WCHAR*
- SDL_windows_gaming_input.c (IEventHandler_CRawGameControllerVtbl_InvokeAdded):
string is WCHAR*
There should be more of these..
2021-01-04 10:00:30 +03:00
Ozkan Sezer
5b14bbff5f
make ANSI/UNICODE versions of WIN??UTF8 macros individually available.
2021-01-04 10:00:10 +03:00
Ozkan Sezer
f2bd861cd7
move SDL_tcsstr definition to core/windows/SDL_windows.h
2021-01-04 08:50:00 +03:00
Ozkan Sezer
f414a43632
simplify Watcom implementation of SDL_MostSignificantBitIndex32()
2021-01-04 03:00:10 +03:00
Ozkan Sezer
ae18109a92
SDL_windowsjoystick.c (SDL_CreateDeviceNotification): use L, not TEXT()
...
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
390fd14f54
SDL_windowswindow.c (SDL_HelperWindowCreate): adjust for ANSI/UNICODE:
...
change SDL_HelperWindowClassName and SDL_HelperWindowName from WCHAR *
to be const TCHAR*
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
398d2764c7
RAWINPUT_InitWindowsGamingInput: change pNamespace from LPTSTR to PCWSTR
...
because WindowsCreateStringReference specifically accepts const WCHAR *
- WGI_JoystickInit(): ditto.
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
f09e0af7aa
SDL_dinputjoystick.c (IsXInputDevice): adjust to be ANSI/UNICODE-agnostic
...
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
ed39f2f3f9
SDL_wasapi_win32.c (WASAPI_PlatformThreadInit): use L instead of TEXT()
...
because AvSetMmThreadCharacteristicsW specifically accepts WCHAR* input
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
01a2f27679
consistently use TEXT() macro with LoadLibrary() and GetModuleHandle()
...
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
b5f0483cb3
fix permissions
2021-01-01 22:30:28 +03:00
Ozkan Sezer
8476df3e31
SDL_mixer.c: remove calls to non-existing m68k asm code.
2020-12-30 23:55:10 +03:00