Sam Lantinga
6501e90018
Use C++ style comments consistently in SDL source code
...
Implemented using this script:
find . -type f -exec sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' {} \;
git checkout \
core/linux/SDL_evdev_kbd_default_keymap.h \
events/imKStoUCS.* \
hidapi \
joystick/controller_type.c \
joystick/controller_type.h \
joystick/hidapi/steam/controller_constants.h \
joystick/hidapi/steam/controller_structs.h \
joystick/SDL_gamepad_db.h \
libm \
render/*/*Shader*.h \
render/vitagxm/SDL_render_vita_gxm_shaders.h \
render/metal/SDL_shaders_metal_*.h \
stdlib/SDL_malloc.c \
stdlib/SDL_qsort.c \
stdlib/SDL_strtokr.c \
test/ \
video/directx/SDL_d3d12_xbox_cmacros.h \
video/directx/d3d12.h \
video/directx/d3d12sdklayers.h \
video/khronos \
video/x11/edid-parse.c \
video/x11/xsettings-client.* \
video/yuv2rgb
sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' hidapi/SDL_hidapi.c
2024-08-22 13:30:02 -07:00
Ozkan Sezer
94827e0acd
SDL_mslibc.c: revert PR/10303 changes
2024-07-28 22:48:05 +03:00
Amir
5db08b86ca
Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"
...
https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.
2024-07-17 14:09:11 -07:00
Sam Lantinga
7a069cc4b0
Allow optimizing memcpy and memset where possible
...
Modern C runtimes have well optimized memset and memcpy, so use those instead of dispatching into SDL's versions. In addition, some compilers can analyze memset and memcpy calls and directly turn them into optimized assembly.
2024-01-21 06:55:29 -08:00
Sam Lantinga
5b3ee51c6c
Updated copyright for 2024
2024-01-01 13:15:26 -08:00
Anonymous Maarten
6127ac0871
Use SDL_DISABLE_ALLOCA instead of HAVE_ALLOCA in SDL_stdinc.h
2023-10-28 18:54:12 +02:00
Anonymous Maarten
b6ae281e97
Use #ifdef/#ifndef instead of #if defined/#if \!defined
2023-03-30 21:35:01 +00:00
Anonymous Maarten
513025b182
Implement _intel_fast_(memcpy|memset)
...
The classic Intel compiler generates calls to these functions when
building the SDL library with SDL_LIBC=OFF.
2023-03-27 06:12:49 +00:00
Anonymous Maarten
a06046c55c
memset and memcpy are not intrinsic functions in new LLVM-based Intel compiler
2023-03-27 06:12:49 +00:00
Sam Lantinga
fde78d12f2
Updated copyright for 2023
2023-01-09 09:41:41 -08:00
Sam Lantinga
63724c113b
Removed the vi format comments from the source
...
Vim users can use the [editorconfig plugin](https://github.com/editorconfig/editorconfig-vim ) to automatically set tab spacing for the SDL coding style.
Fixes https://github.com/libsdl-org/SDL/issues/6903
2022-12-26 11:17:23 -08:00
Pierre Wendling
3c501b963d
Clang-Tidy fixes ( #6725 )
2022-12-01 13:07:03 -08:00
Sam Lantinga
5750bcb174
Update for SDL3 coding style ( #6717 )
...
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.
In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.
The script I ran for the src directory is added as build-scripts/clang-format-src.sh
This fixes:
#6592
#6593
#6594
2022-11-30 12:51:59 -08:00
Sam Lantinga
c5790359fd
Added precompiled header support for Visual Studio and Xcode ( #6710 )
...
Fixes https://github.com/libsdl-org/SDL/issues/6704
2022-11-29 18:34:15 -08:00
Sam Lantinga
2c4159b99a
First pass at changing SDL 2.0 to SDL 3.0
2022-11-21 20:28:58 -08:00
Anonymous Maarten
c3b13346e0
On x86, pass -nodefaultlib to linker when wanting to avoid the C library
2022-10-22 09:28:00 -07:00
Anonymous Maarten
5c150ddc2f
SDL_mslibc.c: fix unknown pragma ignored [-Wunknown-pragmas]
...
Emitted by clang-cl
2022-10-08 23:41:07 +02:00
Anonymous Maarten
36dfbe5d66
stdlib: exclude mslibc functions using SDL_STATIC_LIB macro
2022-07-29 15:05:19 +02:00
Anonymous Maarten
5da85376b9
stdlib: move all mslibc functions to SDL_mslibc.c
...
This allows disabling LTO on them by only specifying a single file.
2022-07-27 09:07:56 -07:00