Commit graph

70 commits

Author SHA1 Message Date
Alibek Omarov
a5f0ca38f1 engine: remove inclusion of SDL headers globally, helps to cleanup code before SDL3 migration 2025-02-28 13:14:47 +03:00
Alibek Omarov
af6b434b71 engine: platform: win32: implement nanosleep using waitable timers with high precision 2025-02-15 11:57:41 +03:00
Alibek Omarov
052ea6a8bd engine: platform: introduce for Platform_NanoSleep, to be used for better sleeping in between frames for lowering CPU usage 2025-02-15 10:11:17 +03:00
Alibek Omarov
32aa1f91bf engine: pass argv0 to crash handler setup, which is required for libbacktrace integration
Fix indentation in crash_posix.c
2025-02-09 15:36:49 +03:00
Alibek Omarov
687fb0123f engine: implement basic gamepad gyroscope calibration
Called on game controller becoming active or by user request.
Exposes current calibration state by read-only console variable.
2025-02-03 13:14:51 +03:00
Alibek Omarov
22f8b6f9c3 engine: platform: enable crash handler for macOS 2025-02-02 18:30:41 +03:00
Alibek Omarov
1b44d7733e engine: platform: add improved Platform_Vibrate2 function, that allows to control vibration strength 2025-02-01 18:08:53 +03:00
Alibek Omarov
b16037eabf engine: drop raw SDL joystick API, always use GameController instead. Implement actually working rumble, ensure we're freeing up all resources related to gamepads 2025-01-31 17:50:19 +03:00
Alibek Omarov
bccd3f2271 engine: pass launcher's default game directory all the way down to Platform_Init, so we mount correct extras.pk3 on Mac 2025-01-23 10:22:53 +03:00
Alibek Omarov
3576e474e6 engine: get rid of SendKeyEvents function, it only listened for WM_QUIT on Windows and we don't use that with SDL 2024-12-27 18:30:01 +03:00
Alibek Omarov
4f98187e9a engine: move select-based stdin input function to platform/posix 2024-12-24 11:13:05 +03:00
Alibek Omarov
cfebee6ea8 engine: split crashhandler to win32 and posix versions 2024-12-24 10:37:49 +03:00
Alibek Omarov
bd0d6644e0 engine: move Sys_SendKeyEvents to platform/win32 2024-12-24 09:59:47 +03:00
Alibek Omarov
614b9113ad engine: platform: as an exception, allow calling direct platform-specific implementations of Platform_Sleep to make them inlined 2024-12-04 18:37:55 +03:00
Alibek Omarov
e14cd758ad engine: turn Platform_Sleep into an inline function that directly calls platform-specific delay functions 2024-12-04 18:32:03 +03:00
Alibek Omarov
ac6dc2c2d3 engine: platform: directly call __NR_gettid syscall for compatibility with older systems 2024-11-18 10:42:39 +03:00
SNMetamorph
50c805826f engine: implemented handling SIGTERM signal for proper stopping dedicated server 2024-10-08 01:05:26 +03:00
Alibek Omarov
024a335505 engine: move wcon definitions to platform.h 2024-07-21 02:06:51 +03:00
Alibek Omarov
739592e50d engine: host: refactoring, reduce usage of global variables a bit 2024-06-12 10:20:09 +03:00
Alibek Omarov
24f23908be engine: platform: stub Sys_DebuggerPresent on unsupported platforms 2024-02-27 05:17:01 +03:00
Alibek Omarov
43bd73f37b engine: platform: that's why commit --amend and/or rebase --interactive your fixes in your patches before proposing them 2024-02-27 04:59:54 +03:00
mittorn
bb2753cbfc engine/system: add asm-based raise implementation for arm and aarch64, making Sys_DebugBreak more relevant, use tgkill instead of kill 2024-02-27 04:54:55 +03:00
Alibek Omarov
a7c422fde6 engine: platform: make Platform_SetTimer static inline to not fix unused-function 2024-01-28 10:00:51 +03:00
Alibek Omarov
ae9c1d9f18 engine: remove single-binary option. Now platforms that don't need external launcher, shall set env.DISABLE_LAUNCHER 2023-12-30 23:45:17 +03:00
mittorn
b4a7c266b5 platform/linux: implement debug timers and cl_maxframetime to catch very long frames on debugger 2023-12-25 14:22:20 +03:00
Alibek Omarov
71b06801ef engine: platform: android: remove dead code 2023-11-03 14:48:28 +03:00
Alibek Omarov
597429cf41 engine, filesystem: unify GetNativeObject between all the APIs. Allow getting filesystem APIs through GetNativeObject 2023-10-31 21:25:11 +03:00
Alibek Omarov
ce39255ef0 engine: host: set rootdir on Android SDL port 2023-10-27 14:25:16 +03:00
Alibek Omarov
680ecfefab engine: platform: pass desired window mode through R_ChangeDisplaySettings 2023-10-10 14:11:06 +03:00
Alibek Omarov
16c87ae2c9 engine: platform: reorganize UpdateStatusLine, make it shared but implemented only if platform has SetStatus. Implement SetStatus for systemd/Linux 2023-06-16 08:43:16 +03:00
Alibek Omarov
c16a10e6f3 engine: platform: refactor Platform_Init/Shutdown/GetNativeObject functions. They are now defined in the header, and call platform-specific functios that defined in platform code 2023-06-16 07:32:19 +03:00
Alibek Omarov
d2237fa144 engine: platform: android: merge new SDL2 based Android port from @Velaron's tree 2023-06-05 21:35:58 +03:00
Alibek Omarov
ef663a8790 engine: partially remove legacy Android port, in preparation of new port merge 2023-06-05 20:30:18 +03:00
Alibek Omarov
6e27926a10 engine: simplify XASH_USE_EVDEV macro usage by giving it's defined positive value 2023-03-27 17:28:19 +03:00
SNMetamorph
e3103249f4 engine: platform: psvita: added developer mode button to launcher 2023-03-27 03:52:51 +03:00
fgsfds
fe3f15ad33 engine: input: psvita: reimplement OSK manually 2023-03-11 07:09:19 +03:00
fgsfds
7424b29e56 engine: initial psvita build support 2023-03-11 07:09:14 +03:00
fgsfds
25a1cb8ce7 Nintendo Switch support (again) 2023-02-05 02:09:32 +01:00
Alibek Omarov
0a49e69818 engine: introduce Sys_DebugBreak function to raise an exception for debugger 2022-11-10 12:10:48 +03:00
Alibek Omarov
0d7a2e7bad engine: platform: change capture API to allow locking/unlocking buffer to prevent race condition, use single function for pause 2022-08-31 06:50:06 +03:00
Alibek Omarov
22ff45f5d0 engine: platform: add audio capture shutdown functions 2022-08-20 03:17:51 +03:00
Velaron
2b9e050f57 engine: voice support 2022-08-18 04:46:11 +03:00
SNMetamorph
cfcd58dd78 engine: client: extended VGUI API interface 2022-05-02 03:29:24 +03:00
SNMetamorph
d3e213aa1b engine: platform: added Platform_GetKeyModifiers 2022-05-02 03:29:24 +03:00
SNMetamorph
26e09c240a engine: platform: added Platform_SetCursorType 2022-05-02 03:29:24 +03:00
SNMetamorph
15eb6808c4 engine: platform: updated clipboard read/write functions 2022-05-02 03:29:24 +03:00
SNMetamorph
22815d2784 engine: server: sv_main: added status line for dedicated server console 2022-04-06 15:17:15 +03:00
Alibek Omarov
a93d9ac71c engine: platform: simplify sound code
Remove SNDDMA_GetSoundtime, because it was mostly copypasted from one
platform code to another.
SNDDMA_GetDMAPos gets removed too, as we have dma.samplepos for that.
2021-03-10 00:16:13 +03:00
Gleb Mazovetskiy
5e0a0765ce Trim all trailing whitespace
The `.editorconfig` file in this repo is configured to trim all trailing
whitespace regardless of whether the line is modified.

Trims all trailing whitespace in the repository to make the codebase easier
to work with in editors that respect `.editorconfig`.

`git blame` becomes less useful on these lines but it already isn't very useful.

Commands:

```
find . -type f -name '*.h' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
find . -type f -name '*.c' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
```
2021-01-04 20:55:10 +03:00
mittorn
3e3aff040e platform: add Platfrom_Init, Platform_Shutdown, Platform_MouseMove move platform-specific code from host.c 2020-02-08 23:15:40 +07:00