Louis Gombert
b33cc21dce
Merge pull request #587 from winterheart/module-fixes
...
Update module, add logger module
2024-09-18 22:18:13 +02:00
Azamat H. Hackimov
dc0cd880e4
Add logger module
...
Implementing separated logger module.
2024-09-18 22:50:08 +03:00
Louis Gombert
ef113543ab
Merge WinController and lnxcontroller files
...
move controller IO processing to the DDIO module
2024-09-18 22:32:09 +02:00
Jan Engelhardt
72fc5c6784
Add member initializers for struct lnxController
/wincontroller
...
lnxgameController::flush accesses this->m_MouseActive before that
member being initialized with something sensible, making ASAN report:
linux/lnxcontroller.cpp:259:8: runtime error: load of value 190, which is not a valid value for type 'bool'
linux/lnxcontroller.cpp:259:33: runtime error: load of value 190, which is not a valid value for type 'bool'
Thanks to the introduction of mem_rmalloc, it has been established
that struct lnxgameController is not malloc'd anywhere, so any
instantiation runs its constructor properly.
2024-09-16 22:12:14 +02:00
Louis Gombert
705c67a1be
Merge pull request #546 from winterheart/logging
...
Enhance logging facility
2024-09-10 09:27:13 +02:00
Azamat H. Hackimov
dc82d2314d
Convert linux to use new logging facility
2024-09-10 03:00:25 +03:00
Louis Gombert
dfc192ac81
Merge pull request #548 from pzychotic/fix-errors
...
Fix small collection of errors
2024-09-08 22:41:46 +02:00
Thomas Roß
68334c54f4
[Linux] Fixed too many parameters to fprintf call
2024-09-07 16:57:37 +02:00
Jan Engelhardt
5f0bdf8184
Fix spello "it's"
2024-09-03 13:26:51 +02:00
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
54f9d75e62
Reduce linux_fix.h usage in project
2024-08-20 23:08:10 +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
Thomas Roß
cce73891fa
[Keyboard] Fixed a bug, where when a keyboard action has a 2nd key binding, both keys need to be hit to trigger the action.
...
(cherry picked from commit 7f4da73dc8a20202b25a5e2e901684ca08c95018)
2024-08-18 21:21:00 +02:00
Azamat H. Hackimov
0ba3828a13
LINUX: minor cleanup on lnxcontroller.cpp
2024-08-15 11:47:43 +03:00
Azamat H. Hackimov
b911d81c2a
LINUX: Use ddio_DoForeachFile()
...
Replace ddio_FindFileStart() with ddio_DoForeachFile().
2024-08-15 11:47:43 +03:00
Louis Gombert
60c5dbf1fe
CMake: add all headers to target sources
...
This can help with CMake IDE integration and file indexing.
2024-08-09 17:09:14 +02:00
Louis Gombert
10de36c0e4
Merge pull request #469 from tophyr/vcpkg-all-thethings
...
Use vcpkg on all presets
2024-08-04 14:10:09 +02:00
Chris Sarbora
e5dcce3c9f
Use vcpkg for all platform presets
2024-08-03 23:38:01 -05:00
Azamat H. Hackimov
cb9e0f8828
Remove unused osTask class
2024-07-28 16:50:43 +03:00
Azamat H. Hackimov
91354d5b9a
Merge pull request #492 from tophyr/pr/posix-defines
...
Use `POSIX` instead of `__LINUX__` for general OS checks
2024-07-15 23:33:10 +03:00
Chris Sarbora
822a411433
Remove loki_utils
...
Inline the only usage of `loki_getprefpath()`, and use `Base_directory` (controlled by `-setdir`) instead of `loki_getdatapath()`.
Inline or eliminate some other code that became empty/unused with loki removal.
2024-07-13 03:23:10 -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
59487976f6
Isolate misc module
...
Isolate misc module for better dependency handling.
2024-06-27 01:26:35 +03: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
Louis Gombert
15dce81bd1
Merge pull request #396 from GravisZro/cleanup
...
More clean up
2024-06-04 07:25:15 +00:00
Azamat H. Hackimov
4795388500
Merge pull request #416 from GravisZro/update/finite
...
Replace _finite with std::isfinite
2024-06-02 23:26:36 +03:00
Louis Gombert
66923d5bc7
Merge pull request #407 from winterheart/remove-ncurses
...
Remove ncurses usage dependency
2024-06-02 20:11:39 +00:00
GravisZro
4e599257a0
Replace _finite with std::isfinite
...
A simple drop in replacement that is multiplatform which means the
defintion in `linux_fix.h` is no longer required.
2024-06-02 14:50:51 -04:00
GravisZro
691dc6487d
Remove one unused macro definition and fix another
2024-06-01 22:21:51 -04:00
Azamat H. Hackimov
09823f9b40
Cleanup linux console code
...
Unify all commands into function interface, which simplifies code.
2024-06-02 03:41:50 +03:00
Azamat H. Hackimov
95caa7b6c3
Remove ncurses enabled console
...
This type of console is enabled only with `-svgalib` and `-dedicated` options. Since there no svgalib direct support (which is pretty old and too specific to Linux tech), it's better completely remove this code for simplicity and reducing external dependencies.
Removed `-svgalib` option as unused now.
2024-05-31 13:12:28 +03:00
GravisZro
f7ae658fe2
Modernize struct/enum/unions type declarations
2024-05-30 03:35:17 -04:00
GravisZro
9cf9781369
Properly format/use variadic macros
2024-05-24 20:57:17 -04:00
Azamat H. Hackimov
a0929aefe2
Rename ddio_common to ddio
2024-05-24 22:18:14 +03:00
Azamat H. Hackimov
6bc3c71a83
Reordering ddio_common module
...
Merge ddio_lnx and ddio_win into ddio_common module.
2024-05-24 22:17:44 +03:00
GravisZro
dc91b22635
Fix rebase breakage
2024-05-24 09:13:36 -04:00
GravisZro
6a9ddd8736
Replace _vsnprintf
/vsnprintf
with std::vsnprintf
2024-05-24 08:52:59 -04:00
GravisZro
13ed05cf6c
Remove unused macros
2024-05-24 08:50:59 -04:00
GravisZro
76e86fed8c
Replace strcmpi
with stricmp
2024-05-24 08:49:04 -04:00
GravisZro
5e5e0c99c3
Replace "short" with "int16_t" and fix missing headers
2024-05-23 23:49:31 -04:00
GravisZro
aebe1bbbb6
Replace "ushort" with "uint16_t" and fix missing includes
2024-05-23 23:16:40 -04:00
GravisZro
26b7776f43
Replace "ubyte" with "uint8_t"
2024-05-23 23:07:26 -04:00
GravisZro
9d3e361a35
Replace "sbyte" with "int8_t"
2024-05-23 23:05:05 -04:00
GravisZro
3dcd21b717
Replace "unsigned short" with "uint16_t"
2024-05-23 23:03:29 -04:00
GravisZro
1618040db5
Replace "unsigned char" with "uint8_t"
2024-05-23 22:58:46 -04:00
GravisZro
2147cfa68b
Replace "unsigned int" with "uint32_t"
2024-05-23 22:51:16 -04:00
Louis Gombert
a1a8056afc
Merge pull request #355 from GravisZro/fix/64bit
...
64-bit fixes
2024-05-23 07:21:36 +00:00
GravisZro
9ebd567178
Utilize Windows types
...
For whatever reason they decided to switch a bunch of Windows types to their
underlying types which causes problems when replacing possibly problematic
32-bit long types. This restores the use of the Windows defined types.
2024-05-22 18:30:56 -04:00