mirror of
https://dev.lirent.ru/Vatrog/vm-vgpu-streamer.git
synced 2026-07-08 23:46:36 +03:00
feat: report on-screen cursor position in producer contract
Append cursor_seq/cursor_visible/cursor_pos to the producer block (host-RO ABI; offsets 168/172/176, existing layout unchanged). Position is reported every pump tick, independent of draw_cursor, so a consumer can overlay its own cursor even when the producer does not composite it. x and y pack into one 8-aligned 64-bit field (single atomic store, no tear); cursor_seq bumps last to gate a consistent read. Adds the vgpu_publish_cursor() engine setter and a lightweight cursor_sample_pos() (position/visibility only, no shape extract) called from the pump.
This commit is contained in:
@@ -100,6 +100,12 @@ void vgpu_present_run(vgpu_ctx* ctx) {
|
||||
last_beat = nowt;
|
||||
}
|
||||
|
||||
/* --- cursor position: sensor data, reported every tick independent of
|
||||
* draw_cursor / compositing (host may overlay it itself) --- */
|
||||
cursor_sample_pos(ctx);
|
||||
vgpu_publish_cursor(rv, (int32_t)ctx->cursor.x, (int32_t)ctx->cursor.y,
|
||||
(uint32_t)(ctx->cursor.visible != 0));
|
||||
|
||||
/* --- reconcile control (gen-seqlock -> apply -> ack) --- */
|
||||
vgpu_control_view cv;
|
||||
uint32_t desired = prev_state;
|
||||
|
||||
Reference in New Issue
Block a user