Commit Graph

17 Commits

Author SHA1 Message Date
Azamat H. Hackimov
79db9aa3e2 Move platform-specific defines and macros to own file crossplat.h 2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
16a6866885 DDIO: new crossplatform SleepMS() function
Use C++ chrono and thread for crossplatform sleep function.
2024-08-20 23:08:10 +03:00
Chris Sarbora
e5dcce3c9f
Use vcpkg for all platform presets 2024-08-03 23:38:01 -05:00
Chris Sarbora
3da53e567f
Programmatically replace all __LINUX__ with POSIX
Steps:
```sh
srcs=$(mktemp)
find . -name "*.cpp" -or -name "*.c" -or -name "*.h" -or -name "*.hpp" -or -name "*.cc" -or -name "*.hh" > $srcs
xargs sed -i 's/ifndef __LINUX__/if !defined(POSIX)/' < $srcs
xargs sed -i 's/ifdef __LINUX__/if defined(POSIX)/' < $srcs
xargs sed -i 's/defined(__LINUX__)/defined(POSIX)/' < $srcs
```
2024-07-12 18:11:54 -05:00
Louis Gombert
5d413b9f30 Fix bad __LINUX__ checks 2024-06-29 18:28:22 +02:00
Louis Gombert
91c18fefc5 Windows SDL2 compilation 2024-06-29 18:21:37 +02:00
Azamat H. Hackimov
c41c3a7cb1 Replace Global* memory functions
Replace Global* memory functions with mem_* equivalents from mem.h, remove compatibility functions on Linux / macOS platforms.
2024-06-15 22:07:45 +03:00
GravisZro
2147cfa68b Replace "unsigned int" with "uint32_t" 2024-05-23 22:51:16 -04:00
Azamat H. Hackimov
3fa32ff386 Reorder headers related to linux module 2024-05-19 12:21:43 +03:00
Azamat H. Hackimov
bde23461ea Replace non-portable itoa with sprintf
Minor fixes and header cleanup.
2024-05-19 02:34:09 +03:00
JeodC
a4ab78192c Join license header with historical commentrs
Join the license header with historical comments using a separator so IDEs can correctly parse the initial header.

Also use .gitattributes to ensure all files are LF.
2024-05-08 14:41:19 -04:00
Ryan C. Gordon
001a533399
Initial migration from SDL 1.2 to SDL2. 2024-05-02 08:29:21 -04:00
Ryan C. Gordon
6c8977caf0
Heavy patching for compiler warnings.
The vast majority of this is fixing up `char *` that should be `const char *`
but a handful of other fixes, like potential buffer overflows that GCC
noticed, etc, were applied as well.

This removes `-Wno-write-strings` from CMakeLists.txt, as it is no longer
necessary, as there is no longer a flood of compiler warning spam when
building.

This does not fix all compiler warnings; there are still a handful, and they
are legitimate, but they can be dealt with in a future commit.
2024-04-29 00:18:56 -04:00
Kevin Bentley
1f45163248 Updated source to reflect the license that this code is released under. 2024-04-20 09:57:49 -06:00
Azamat H. Hackimov
38128ea134 Additional clang-format 2024-04-17 00:25:04 +03:00
Kevin Bentley
c6640cc631 clang-format on everything. 2024-04-16 12:56:40 -06:00
Kevin Bentley
df209742fc Initial import 2024-04-15 21:43:29 -06:00