Commit graph

12 commits

Author SHA1 Message Date
Sam Lantinga fde78d12f2 Updated copyright for 2023 2023-01-09 09:41:41 -08:00
Sylvain 93e2903ac5 Add SDL_PlayAudioDevice() to play audio. Remove pause_on param from SDL_PauseAudioDevice() 2023-01-06 09:15:39 -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
Daniel Gibson 22e22ba196 Add SDL_main.h includes to tests
.. including cmake/test/*.c, whatever that does

(this is needed now because SDL.h doesn't include SDL_main.h anymore)
2022-12-15 08:01:01 -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 0a48abc860 Switch header convention from #include "SDL.h" to #include <SDL3/SDLh>
I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```

I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
   if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
        find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
    else
        find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
    fi
done
```

Fixes https://github.com/libsdl-org/SDL/issues/6575
2022-11-26 22:15:18 -08:00
Sam Lantinga 63f307fe1f Remove SDL_config.h from the public headers
The SDL headers are no longer dependent on the build configuration.

Fixes https://github.com/libsdl-org/SDL/issues/6643 and https://github.com/libsdl-org/SDL/issues/6641
2022-11-26 04:48:36 -08:00
Simon McVittie 40bef98f8b test: Add a mode to skip tests that involve arbitrary delays
This can be used as a quick acceptance test for CI workflows.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 18:17:55 -07:00
Sam Lantinga 120c76c84b Updated copyright for 2022 2022-01-03 09:40:21 -08:00
Ozkan Sezer c401627793 testsurround.c: remove unnecessary libc includes and stdint.h types 2021-10-31 08:14:50 +03:00
Ozkan Sezer e28e399338 testsurround.c: add missing newline at end of file. 2021-10-31 08:00:20 +03:00
Cameron Gutman cd66c050fe testsurround: Add surround sound channel tester 2021-10-30 21:26:03 -07:00