Commit Graph

237 Commits

Author SHA1 Message Date
Geoffrey McRae
38b6b0ac40 [common] windows/event: fix control flow issue 2023-11-11 20:34:30 +11:00
Geoffrey McRae
ec88a52fe2 [common] ivshmem: fix possible resource leak 2023-11-11 14:04:54 +11:00
Geoffrey McRae
aa42751743 [client] common: fix time of check/time of use issue 2023-11-11 13:48:41 +11:00
Geoffrey McRae
9a53880b9b [common] ivshmem: fix failure to check ioctl for error result 2023-11-11 13:48:41 +11:00
Geoffrey McRae
cce12508cc [egl] shader: fix reliance on null terminated strings
Compiled in resources often will not contain a null terminator, as such
we must not use functions that rely on it. This implements a memsearch
function that performs like strstr on a buffer instead of a null
terminated string.
2023-11-11 13:48:41 +11:00
Geoffrey McRae
138a0aee53 [all] update cmake minimum version 2023-11-10 06:28:05 +11:00
Geoffrey McRae
d592f13f88 [host] all: don't combine the downsampler rules 2023-11-10 06:28:05 +11:00
Geoffrey McRae
d847c2c144 [common] add new frame type string to KVMFR lookup table 2023-11-10 06:28:05 +11:00
Geoffrey McRae
c665044bfa [client] implement support for RGB24 packed data 2023-11-10 06:28:05 +11:00
Geoffrey McRae
578d98fd22 [host] DXGI: initial implementation of RGB24 support
This commit breaks damage tracking and the dx12 backend and is not in
a state where it should be used by the general public.
2023-11-10 06:28:05 +11:00
Geoffrey McRae
c591f7a8ae [common] vector: assert if the vector itemSize <= 0 2023-10-29 20:27:49 +11:00
Geoffrey McRae
e0bdd869d6 [all] fix client build on linux 2023-10-22 04:00:44 +11:00
Geoffrey McRae
742e41c2c3 [host] dxgi: fix HDR damage aware copy 2023-10-22 03:15:12 +11:00
Geoffrey McRae
3ed71a09f4 [common] all: implement strdup directly
Dr.Memory on Windows complains bitterly about invalid heap free as
it doesn't seem to be able to track this function's allocations. As
it's such a trivial function we can just implement it locally.
2023-10-22 02:25:25 +11:00
Geoffrey McRae
2e515657dd [all] update/add license headers 2023-10-20 15:36:34 +11:00
Geoffrey McRae
b2ec60d2dc [client/host] common: fix trim value bug reading the wrong variable 2023-09-13 21:54:31 +10:00
Netboy3
53525847fd [common] options: Fix regression in option parsing logic 2023-05-03 18:20:01 +10:00
Geoffrey McRae
9d66a68403 [common] options: fix build on windows (no strndup) 2023-05-02 12:32:59 +10:00
Geoffrey McRae
07bcc54732 [common] options: trim whitespace from option values
This closes #1071
2023-05-02 12:27:17 +10:00
Geoffrey McRae
11676d3d56 [common] windows: fix invalid free of stack allocated memory 2023-04-11 16:51:25 +10:00
Jonathan Rubenstein
8a45a74fb1 [common] appstrings: Amend blurb for jjrcop with fluff
Very cheeky but is self-authored :D
2022-06-20 19:09:16 +10:00
Quantum
a8521b821e [all] cmake: standardize indentation to 2 spaces 2022-05-29 11:16:16 +10:00
matthewjmc
53c843d9dd [common] Update framebuffer metadata + references 2022-05-16 20:01:09 +10:00
Geoffrey McRae
81aa24d4d3 [client] overlay/config: general UX changes
* Moved the LG license and version onto a seperate tab.
* Added general donation section and link to the website donation page
* Removed donation details under gnif's section
2022-05-15 17:16:07 +10:00
Geoffrey McRae
d8f2125543 [common/doc] add monero (XMR) donation address 2022-05-15 16:47:57 +10:00
Geoffrey McRae
3a8cb6a613 [client/common] fixes for issues detected through static analysis. 2022-03-07 10:14:52 +11:00
Chris Spencer
1ca43c4727 [common] appstrings: add spencercw 2022-02-14 15:09:13 +11:00
Geoffrey McRae
35bf30910b Revert "[common] option: fix bounds check in the argument parser."
This reverts commit db78c8e468.
I need some sleep, this was already fine as it was...
2022-01-30 20:25:02 +11:00
Geoffrey McRae
db78c8e468 [common] option: fix bounds check in the argument parser.
The recent `pwnkit` exploit brought this to my attention, not that we
are a setuid process we should still do this properly... who knows where
this code might get used in the future.
2022-01-30 19:56:06 +11:00
Geoffrey McRae
4ff39616b2 [common] rb: correct invalid accesses of atomics 2022-01-27 18:20:03 +11:00
Chris Spencer
599fdd6ffd [common] ringbuffer: add unbounded mode
In unbounded mode, the read and write pointers are free to move
independently of one another. This is useful where the input and output
streams are progressing at the same rate on average, and we want to keep
the latency stable in the event than an underrun or overrun occurs.

If an underrun occurs (i.e., there is not enough data in the buffer to
satisfy a read request), the missing values with be filled with zeros. When
the writer catches up, the same number of values will be skipped from the
input.

If an overrun occurs (i.e., there is not enough free space in the buffer to
satisfy a write request), excess values will be discarded. When the reader
catches up, the same number of values will be zeroed in the output.

Unbounded mode is currently unused since our audio input and output
streams are not synchronised. This will be implemented in a later commit.

Also reimplemented as a lock-free queue which is safer for use in audio
device callbacks.
2022-01-27 18:03:11 +11:00
Geoffrey McRae
f3ebde7d9f [common] ivshmem: fix memory leak 2022-01-25 03:37:56 +11:00
Geoffrey McRae
905c1d7f58 [common] ivshmem: check for failure to find a device 2022-01-25 03:37:56 +11:00
Geoffrey McRae
9c49dc6efd [common] linux/time: fix memory leak 2022-01-14 14:19:16 +11:00
Geoffrey McRae
344d2ec599 [common] linux: replace create_timer with a single threaded timer
Now LG uses a 25Hz tick timer it is an issue that `create_timer` spawns
a new thread for every single timer event, so instead multiplex all the
timers into a single thread with a 1ms resolution.
2022-01-12 13:00:12 +11:00
Geoffrey McRae
6bba9bc25d [client/common] move ll from the client into the common code module 2022-01-12 12:22:18 +11:00
Geoffrey McRae
780cf5f362 [client] overlay: add modal message dialog support 2022-01-08 18:58:48 +11:00
Quantum
2099161b7e [client] cpuinfo: implement CPU socket count for Windows 2022-01-07 21:03:20 +11:00
Quantum
a40a964b30 [client] cpuinfo: implement CPU socket count for Linux 2022-01-07 21:03:20 +11:00
Quantum
194241c5a3 [common] cpuinfo: add sockets to interface 2022-01-07 21:03:20 +11:00
Geoffrey McRae
952ebea2c5 [all] refresh copyright dates 2022-01-05 19:42:46 +11:00
Geoffrey McRae
0d27092ef5 [all] move min/max and upcast macros into common/util.h 2022-01-05 19:41:57 +11:00
Geoffrey McRae
2ed3c82de0 [common] provide debug print methods for dependent libraries to use 2021-12-29 16:01:42 +11:00
Geoffrey McRae
d99ec3e9c0 [common] ringbuffer: remove exta locking and add append/consume funcs
As the ringbuffer is now in use for audio it makes sense to provide bulk
append and consume functions that are thread safe instead of adding
locking over all of the functions. This partially reverts the prior
commit that added the extra locking.
2021-12-26 11:09:42 +11:00
Geoffrey McRae
8ba4b56dba [common] ringbuffer: added shift and locking for thread safety 2021-12-26 11:09:42 +11:00
Geoffrey McRae
affc3f51f8 [common] rects: fix error introduced in cosmetics patch
`x2` and `y2` are required here as they need to operate on the original
x & y before they are clamped. Can't believe I missed this *facepalm*
2021-10-26 23:35:09 +11:00
Geoffrey McRae
6078b11200 Revert "[common] rects: fix damage regression introduced in the cosmetics patch"
This was correct, brainfart moment
2021-10-26 22:26:20 +11:00
Geoffrey McRae
68a9504366 [common] rects: fix damage regression introduced in the cosmetics patch 2021-10-26 22:15:54 +11:00
Geoffrey McRae
9d71655273 [common] rects: fix return value of removeRects 2021-10-24 22:22:13 +11:00
Geoffrey McRae
2f0b97a487 [common] rects: de-dup code and don't needlessly copy rect over itself 2021-10-24 22:19:28 +11:00