Commit Graph

46 Commits

Author SHA1 Message Date
Alibek Omarov a6c2cfe89b engine: avoid constants in Q_strncpy third argument, where possible 2024-05-06 14:27:26 +03:00
Alibek Omarov d8910b0e38 engine: platform: linux: do not search sd_notify if NOTIFY_SOCKET isn't set 2024-03-19 21:23:53 +03:00
Alibek Omarov 24f23908be engine: platform: stub Sys_DebuggerPresent on unsupported platforms 2024-02-27 05:17:01 +03:00
Alibek Omarov 7d464df107 engine: platform: linux: define portability macro for sigevent (oh, glibc...) 2024-01-23 19:22:56 +03:00
Alibek Omarov 296f89acf9 engine: platform: linux: fix build with musl (and probably other libcs) using portability macro 2024-01-23 18:57:33 +03:00
Alibek Omarov df6546d5b1 engine: client: add new gamma implementation
* immediately expose it in RefAPI. Bump RefAPI to version 7.
* remove VID_StartupGamma, it's not used anymore
* remove stub lightgamma and direct cvars
* add a temporary check for v_direct and v_lightgamma default values
2024-01-09 03:33:24 +03:00
Ruslan Piasetskyi 15bc09b06b engine: platform: linux: Add gettid definition for old systems
The gettid() library support was added in glibc 2.30. Earlier glibc
versions did not provide a wrapper for this system call, necessitating
the use of syscall(2).

Also, put _GNU_SOURCE definition in the guard to avoid the warning:
  ../engine/platform/linux/sys_linux.c:16: warning: "_GNU_SOURCE" redefined
   #define _GNU_SOURCE

  <command-line>: note: this is the location of the previous definition
2024-01-06 13:43:35 +03:00
Alibek Omarov 778b8ede58 engine: platform: linux: add forgotten _GNU_SOURCE at the top of the file to enable gettid extension 2023-12-27 03:10:20 +03:00
Alibek Omarov f8a1a2ed71 engine: platform: linux: add missing math.h include 2023-12-26 18:56:30 +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 b58fbc0c94 engine: platform: linux: fix according to platform.h changes 2023-10-10 14:12:53 +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 b84aba68fa engine: platform: implement generic GetNativeObject for POSIX systems without SDL2 2023-06-07 04:07:53 +03:00
Alibek Omarov bd52a9ec2d engine: platform: linux: move evdev_keydebug cvar to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov d9cbf1fa89 engine: client: move input cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov 5d7d5319fd engine: move ref cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov d4470402ee engine: move vid cvars to static allocation 2023-05-27 21:52:58 +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
fgsfds 4b8e11f561 engine: remove stray #if XASH_PSVITA 2023-03-11 07:09:19 +03:00
fgsfds 7424b29e56 engine: initial psvita build support 2023-03-11 07:09:14 +03:00
Alibek Omarov 2d2523df4a engine: client: touch: generalise touch emulation code
* fix doubleclicks and wheels in VGUI
2022-10-12 05:18:19 +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
SNMetamorph 9f9141823a engine: added audio backend print to s_info command 2022-08-20 15:36:02 +03:00
Alibek Omarov 22ff45f5d0 engine: platform: add audio capture shutdown functions 2022-08-20 03:17:51 +03:00
SNMetamorph 97879430e9 engine: small code fixes related to voice chat 2022-08-18 04:46:11 +03:00
Alibek Omarov 94dc74a37f engine: restrict potentially harmful engine commands 2021-11-23 05:23:38 +03:00
Alibek Omarov f8e6033ae6 engine: move TIMER_LINUX to TIMER_POSIX, enabling dedicated builds for FreeBSD and other *nix platforms 2021-06-26 00:19:49 +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
Alibek Omarov c68af64fe5 engine: platform: fix access to uninitialized audio subsystem when -nosound was passed 2021-03-10 00:03:12 +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
Gleb Mazovetskiy 33ba1f25f3 sys_linux.c: Increase buffer size for /proc/self/status
Fixes #263
2021-01-02 04:21:01 +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
mittorn 3a416636f1 engine: mark GAME_EXPORT's 2020-01-19 08:15:54 +07:00
Alibek Omarov 9421457b3a engine: big refactoring commit, instead of using platform-specific platform-specific macros, use appropriate macros set by public/build.h 2019-11-24 03:52:08 +03:00
Alibek Omarov 744f75d4a3
engine: linux: simplify Platform_DoubleTime 2019-11-20 16:45:55 +03:00
Alibek Omarov 0cb591821a Merge sdl12-port into master 2019-11-06 22:29:04 +03:00
mittorn 1365020302 ref: add enum for screen rotation 2019-11-04 20:27:46 +07:00
Alibek Omarov 9d826016b0 engine: finish sdl1.2 port 2019-11-02 08:56:07 +03:00
mittorn 291fdfac68 platform/evdev: add some keys, add keyevent debug 2019-10-31 13:22:58 +07:00
mittorn 7f6395fa7d ref: display transformation API 2019-10-31 01:36:07 +07:00
mittorn 6723758edc platform/alsa: fix case when buffer size is POT, improve latency, calculate sample count 2019-10-26 05:49:23 +07:00
mittorn 23956a0b82 platform: alsa support 2019-10-25 09:04:52 +07:00
mittorn 803c396fa2 platform: new fbdev bakend, move in_evdev to bakends 2019-10-22 01:42:02 +07:00
Alibek Omarov fbb88a55cb engine: linux: fix C89 2019-10-05 02:10:46 +03:00
Alibek Omarov 9d93eca572 platform: linux: fix descriptor leak 2018-11-18 17:50:15 +03:00
Alibek Omarov 7c772d6bfd engine: rework timer stuff, move to platform. Move debugger present checks to platform 2018-11-16 16:32:16 +03:00