Tudor Brindus
fd28d0604e
[host/client] kvmfr: request activation based on guest state
2022-02-08 15:27:27 +11:00
Tudor Brindus
9cd8027901
[client] main: request WM activation on first frame
2022-02-08 14:54:55 +11:00
Geoffrey McRae
22b968ff53
[client] audio: change the audio latency graph sample point
...
This removes the need for locking while also giving a better result in
the graph output. Also when the graph is disabled via the overlay
options it will no longer cause redraws.
2022-01-28 10:59:12 +11:00
Geoffrey McRae
a560a610d9
[client] audio: allow building without any audio support
2022-01-27 18:03:11 +11:00
Geoffrey McRae
3c9b9e6370
[client] main: fix heap-buffer-overflow on cursor update
2022-01-26 20:05:51 +11:00
Geoffrey McRae
efa49391fc
[client] fix race segfault on pointer queue unsubscribe/timeout
2022-01-26 17:20:12 +11:00
Geoffrey McRae
dc918c55b6
[client] main: only copy the needed cursor data instead of everything
2022-01-24 06:36:15 +11:00
Geoffrey McRae
a8ba014b52
[client] main: lgmpClientMessageDone is not idempotent
2022-01-24 04:10:49 +11:00
Geoffrey McRae
689cc53255
[client] audio: add audio playback latency interface and graph
2022-01-17 22:13:41 +11:00
Geoffrey McRae
464fee3e20
[client] overlay/graphs: allow the graph to have a custom title format
2022-01-17 22:08:56 +11:00
Geoffrey McRae
5a3fe151e4
[client] main: don't use Linux keybinds if the guest is not Linux
2022-01-17 20:26:45 +11:00
Quantum
b020372972
[client] imgui: allow arrows to be displayed
2022-01-17 15:09:03 +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
1851002fc1
[client] all: remove ll_walk
and migrate over to ll_forEachNL
2022-01-12 12:17:29 +11:00
Geoffrey McRae
ca0bc7c514
[client] close message boxes if the client connects
2022-01-12 10:04:16 +11:00
Geoffrey McRae
4122841b09
[client] spice: fix memory leak
2022-01-12 10:03:56 +11:00
Geoffrey McRae
4411d21135
[client] spice: update submodule to prevent segfault on shutdown
2022-01-12 07:42:01 +11:00
Geoffrey McRae
24193aaaa6
[client] main: added user feedback during LGMP/KVMFR version check
2022-01-09 02:15:18 +11:00
Geoffrey McRae
d42e409728
[client] spice: show message when connected to the wrong guest
2022-01-08 19:32:58 +11:00
Geoffrey McRae
780cf5f362
[client] overlay: add modal message dialog support
2022-01-08 18:58:48 +11:00
Geoffrey McRae
db2e38ae4d
[client] overlay: add 25Hz tick
function
...
This allows an overlay to manage itself for timed events like
alerts/messages, etc.
2022-01-08 14:33:07 +11:00
Quantum
8e8d8834de
[client] main: print guest CPU socket count information
2022-01-07 21:03:20 +11:00
Geoffrey McRae
fe7973ea24
[client] audio: implement record interface and glue
2022-01-06 23:49:20 +11:00
Geoffrey McRae
a114ea3de4
[client] audio: move audio code into it's own unit
2022-01-06 23:24:13 +11:00
Geoffrey McRae
e6bd36ec7c
[client] audio: refactor audio
to playback
and add record
funcs
2022-01-06 22:47:22 +11:00
Geoffrey McRae
208b722348
[client] main: failure to find a renderer is an error
2022-01-06 15:19:35 +11:00
Geoffrey McRae
67509d7a2d
[client] main: format the guest information a bit better
2022-01-06 15:19:16 +11:00
Geoffrey McRae
c20bb27b67
[client] main: move checkUUID to after informational prints are done
...
This change makes the client print the check failure as the last thing
before disconnecting making it more obvious to the user.
2022-01-06 15:18:10 +11:00
Geoffrey McRae
8cdeaceed9
[client] main: fix reversed check logic from testing/debug
2022-01-06 14:40:34 +11:00
Geoffrey McRae
7bcd0dd97f
[client] main: if spice is in use check the guest uuid matches
...
If the guest supports sending us it's UUID and PureSpice has also
reported the guest's UUID, check them to see if the user has
accidentially connected to the wrong spice socket.
2022-01-06 14:38:46 +11:00
Geoffrey McRae
7ccd202d36
[client] main: fix out by one error in the bounds check for os type
2022-01-05 20:40:13 +11:00
Geoffrey McRae
177a997883
[client] main: parse the KVMFR records and log the details
2022-01-05 20:27:43 +11:00
Geoffrey McRae
952ebea2c5
[all] refresh copyright dates
2022-01-05 19:42:46 +11:00
Geoffrey McRae
ba9f2b85b6
[host/client] kvmfr: update to include extra user data about the VM
...
This change allows the host to provide information to the client about
how the VM is configured, information such as the UUID, CPU
configuration and capture method both for informational display in the
client as well as debugging in the client's logs.
The format of the records allows this to be extended later with new
record types without needing to bump the KVMFR version.
2022-01-05 19:18:43 +11:00
Geoffrey McRae
0d00936aac
[client] spice: update PureSpice submodule
2022-01-04 19:06:14 +11:00
Geoffrey McRae
4b8255aa28
[client] spice: allow spice startup to happen in parallel
2022-01-01 21:07:55 +11:00
Geoffrey McRae
c8b4787cb1
[client] don't report a spice error on graceful shutdown
2021-12-30 21:02:53 +11:00
Geoffrey McRae
d43126f433
[client] main: release the grab if the host application is stopped
2021-12-30 17:08:19 +11:00
Geoffrey McRae
764e52fb20
[client] undo commented code from debugging
2021-12-30 13:19:59 +11:00
Geoffrey McRae
6f17e89b16
[host] lgmp: update to fix regression in initialization of the header
2021-12-30 13:00:56 +11:00
Geoffrey McRae
c74d48691f
[client] spice: update submodule and update to use new PSConfig members
2021-12-29 20:22:07 +11:00
Geoffrey McRae
d1a765c179
[client] spice: update PureSpice submodule and adjust for new API usage
2021-12-29 16:02:22 +11:00
Geoffrey McRae
65ba2e8df9
[client] spice: update submodule and refactor calls & types
2021-12-28 22:04:35 +11:00
Geoffrey McRae
433a5420cb
[client] audio: update PureSpice and add support for volume control/mute
2021-12-26 11:09:42 +11:00
Geoffrey McRae
cca6492069
[client] audio: call audioDev->free on spice thread exit
2021-12-26 11:09:42 +11:00
Geoffrey McRae
e810577317
[client] audio: initial addition of PipeWire audio support via SPICE
2021-12-26 11:09:42 +11:00
Geoffrey McRae
d69069fb09
[client] egl: keep the mouse cursor 1:1 when downscaling
...
This keeps the cursor a usable size when the guest is running a high
resolution and downscaling (ie, 4K -> FHD).
2021-12-26 11:08:42 +11:00
Geoffrey McRae
a21eee26ab
[client] main: fix buffer overflow due to cursor data size change
2021-11-02 01:01:17 +11:00
Geoffrey McRae
e82f8911a6
[client] main: malloc buffer for cursor data instead of using the stack
2021-11-01 13:45:30 +11:00
Geoffrey McRae
e914e56c48
[client] stop the cursorThread if video feed is disabled
...
The cursorThread prevents the host from going to sleep when the
video feed is disabled as it's subscribed to the cursor queue. Stopping
the cursorThread will unsubscribe from the queue and allow the host
application to disable capture.
2021-10-06 20:05:31 +11:00
Quantum
ad4b40fad6
[client] opengl: add gl_dynprocs module
...
This is similar to egl_dynprocs, except for OpenGL functions.
2021-10-01 01:45:11 +10:00
Quantum
72f3a9f3cf
[client] wayland: free presentation objects
...
Since the display server owns a graph, it was necessary to move the overlay
graphs destruction so that it happens after display server destruction.
2021-09-11 11:52:52 +10:00
Quantum
ce091fd4e4
[client] main: correctly handle EINTR from nanosleep
...
Previously, all progress made during sleep is reset, so if the thread keeps
getting interrupted before the sleep finishes, the sleep will never complete.
2021-09-04 13:31:30 +10:00
Quantum
c7666b065a
[client] main: print out CPU information on startup
2021-08-31 20:14:10 +10:00
Quantum
79a9127c04
[client] imgui: use consistent modal background colours
...
The translucent white modal background sort of cancels out the dark
background we apply to the overlay, which is undesirable. It should
instead further darken the background.
For consistency, we now use igGetColorU32Col(ImGuiCol_ModalWindowDimBg)
to draw the overlay background, to avoid hardcoding the same colour in
multiple places.
2021-08-31 09:09:26 +10:00
Quantum
5f3bd778c0
[client] egl: add debug prints for renderStartup errors
2021-08-14 12:20:12 +10:00
Quantum
579f998519
[client] all: replace assert with DEBUG_ASSERT
2021-08-14 12:19:07 +10:00
Quantum
a76b274e1a
[client] main: use ARRAY_LENGTH macro
2021-08-13 20:24:01 +10:00
Geoffrey McRae
f4a925a750
[client] main: destroy and finish fontconfig usage
...
Fixes ASAN reported memory leak
2021-08-08 16:21:48 +10:00
Geoffrey McRae
30ed563504
[client] interface: refactor to use camlCase function names
2021-08-08 15:43:42 +10:00
Geoffrey McRae
f8ae291090
[client] interface: switch to using UPCAST for the renderer's data
2021-08-08 15:32:01 +10:00
Geoffrey McRae
45d1f27fb4
[client] interface: rename LG_Renderer to LG_RendererOps
...
Part of the standardisation of using the `Ops` suffix for all interfaces
2021-08-08 14:43:04 +10:00
Geoffrey McRae
16f68d6b1b
[client] main: don't call stopWaitFrame if jitRender is not enabled
2021-08-08 09:01:48 +10:00
Geoffrey McRae
162b1b93db
[client] main: don't include the swap into the render timings
...
If vsync is enabled the swap will block until vblank skewing the timing
metrics.
2021-08-07 01:45:42 +10:00
Geoffrey McRae
0ec66ba210
[client] main: increase render graph max scale to 10ms
...
Some GPUs (like my K1200) easly exceed 2ms on the render time making
this graph useless.
2021-08-07 01:45:42 +10:00
Geoffrey McRae
afbee641b1
[client] implement support for KVMFR_FEATURE_SETCURSORPOS
2021-08-05 22:19:35 +10:00
Geoffrey McRae
719fec0a45
[client] don't terminate after successful upgrade of LGMP
2021-08-05 21:45:50 +10:00
Geoffrey McRae
2fa09dbd95
[client] allow the user to upgrade if the LGMP version doesn't match
2021-08-05 21:43:49 +10:00
Geoffrey McRae
a37b527bbd
[client] main: make core overlays register before everything else
...
The display servers and renderers may want to register their own
overlays in the future, as such we need g_state.overlays to be
initialized to allow for this.
2021-08-05 07:01:28 +10:00
Geoffrey McRae
6c84c0eca6
[client] overlay: move keybinds and config into the overlays
...
This adds a new `earlyInit` call which allows the overlay to register
options before actually being intialized. Also the keybind handling and
state tracking for each overlay has been moved internal to the overlay
itself.
2021-08-05 06:40:06 +10:00
Geoffrey McRae
d90e658e3b
[client] main: fix incorrectly hiding the cursor dot in captureOnly mode
2021-08-05 06:11:12 +10:00
Geoffrey McRae
f3f0157d3c
[client] overlay: allow registration of runtime configuration options
2021-08-05 00:56:31 +10:00
Quantum
51b9cd4e5a
[all] copyright: use unicode copyright sign ©
...
This is done for consistency with the license strings in appstrings.c.
2021-08-04 21:16:35 +10:00
Quantum
8ebaf92006
[client] main: rename frameTimings to uploadTimings
2021-08-04 10:38:30 +10:00
Quantum
62cd5e9c57
[client] main: add graph for time spent rendering
...
This is the time spent in the on_render function, not the time between
frames. Having this information helps diagnose slowdowns in renderers.
2021-08-04 10:38:30 +10:00
Geoffrey McRae
d2c36b8449
[client] overlay: add new configuration overlay [wip]
2021-08-04 10:27:47 +10:00
Geoffrey McRae
c15d0dc672
[client] ds: waitFrame now returns a bool to force rendering if needed
...
X11 needs to calibrate to get the best possible latency, as such it
needs the scene to render so that the render time of the scene can be
accounted for in the delay calculation.
2021-08-04 06:49:35 +10:00
Geoffrey McRae
4e435e6199
[client] ds: tell the display server if jitRender is requested
2021-08-04 06:05:42 +10:00
Geoffrey McRae
f3413815a9
[client] egl: re-implement DMABUF (untested)
2021-08-03 03:59:03 +10:00
Geoffrey McRae
13d9c84dc9
[client] egl: replace monolithic EGLTexture with modular version
...
The way things were handled in EGLTexture is not only very hard to
follow, but broken. This change set breaks up EGLTexture into a modular
design making it easier to implement the various versions.
Note that DMABUF is currently broken and needs to be re-implemented.
2021-08-02 23:37:33 +10:00
Geoffrey McRae
e23144aecd
[client] overlay: add new needs_render
for realtime overlays
2021-08-01 21:13:59 +10:00
Quantum
f64310320a
[client] ds: add stopWaitFrame to terminate waitFrame early
...
This is used on exit to unblock the render thread.
2021-08-01 19:54:28 +10:00
Geoffrey McRae
695b7b793c
[client] main: allow 'catchup' when using jitRender
2021-08-01 19:32:01 +10:00
Quantum
986f92d0db
[client] main: use skipFrame and signal frameEvent
...
We need to signal frameEvent to render the first frame. Otherwise, wayland
fails to configure the window, as configuration happens in EGL swap.
2021-08-01 18:54:55 +10:00
Geoffrey McRae
9d95154b85
[client] main: make use of new needs_render
call
2021-08-01 18:44:35 +10:00
Geoffrey McRae
2d74c93232
[client] main: alerts and overlay toggles should invalidate the window
2021-08-01 18:04:43 +10:00
Geoffrey McRae
17687fdea3
[client] main: only render if there is actually something to render
2021-08-01 17:39:52 +10:00
Quantum
77b3d45e0e
[client] ds: change signalNextFrame to waitFrame
2021-08-01 17:29:15 +10:00
Quantum
aed370c7ce
[client] main: implement just-in-time render mode
...
When requested, JIT render mode will be used if the display server supports it.
Otherwise, a warning is generated instead.
This essentially uses the signalNextFrame logic for imgui, but for everything.
We automatically enable this mode when overlay is on.
Currently, this exposes some damage tracking bugs in the EGL renderer.
2021-08-01 12:24:19 +10:00
Geoffrey McRae
66df99f5fd
[client] imgui: don't free the IniFilename until imgui destruction
2021-08-01 00:55:36 +10:00
Quantum
7c3c68b84b
[client] imgui: put imgui.ini in $XDG_CONFIG_DIR/looking-glass
2021-07-31 21:19:26 +10:00
Quantum
6109067275
[client] config: load config file based on new lgConfigDir()
2021-07-31 21:11:09 +10:00
Quantum
c8dc037e94
[client] imgui: use signalNextFrame if possible
...
This allows imgui to be rendered at screen refresh rate for supported display
server backends.
2021-07-31 19:05:21 +10:00
Geoffrey McRae
971e91238a
[client] main: bump the minimum fps to 60fps when showing the overlay
2021-07-31 16:19:55 +10:00
Quantum
64c906b801
[client] main: prevent the user from launching looking glass as setuid
...
We don't want to encourage craziness of people making the client suid to
bypass permission issues on the shm file.
Note: I see no evidence of this happening in the wild, but let's be
proactive.
2021-07-31 14:58:48 +10:00
Quantum
86b50cc8ab
[client] imgui: initialize keymap
...
This allows ImGui to understand some of the basic key presses.
Also moved the include guard from kb.c to kb.h where it actually makes sense.
2021-07-31 14:57:41 +10:00
Quantum
f1b1da60ea
[client] imgui: improve method for high DPI
...
We now give ImGui the true logical size of the window and tell it to scale
the framebuffer. To fix the blurry fonts, we continue to load fonts at the
scale necessary for the DPI and use FontGlobalScale to shrink the fonts back
to the logical size. The font rectangle is then expanded by the framebuffer
scaling, resulting in good text rendering.
This method has the advantage of not messing up the sizes of resizable
overlays when moving across monitors.
2021-07-31 14:56:49 +10:00
Quantum
0402dd521a
[client] imgui: ask display server to display cursors
2021-07-31 14:56:04 +10:00
Quantum
da28db2ca4
[client] ds: change showPointer to setPointer for more cursors
...
Currently everything only supports LG_POINTER_NONE and LG_POINTER_SQUARE.
2021-07-31 14:56:04 +10:00
Quantum
134829cbf2
[client] imgui: make graph y-axis configurable
...
The default of [0, 50] makes sense for FPS/UPS graphs, but does not for
things like the import graph. The latter should not take more than 5 ms
for sure.
This commit allows the min/max y-axis value to be specified when registering
the graph.
2021-07-29 15:54:15 +10:00