Commit graph

607 commits

Author SHA1 Message Date
Simon Ser
1e163fa358 steamcompmgr: check for XNextEvent errors 2021-09-09 19:56:50 +02:00
Simon Ser
597fc8fa48 Move signal handler to main 2021-09-09 19:49:31 +02:00
Simon Ser
1989c291ee Avoid double-closing GEM handles 2021-09-04 17:30:13 +02:00
Simon Ser
4330ec5433 drm: clean up buffer handles
Closes: https://github.com/Plagman/gamescope/issues/60
2021-09-04 16:43:22 +02:00
Pierre-Loup A. Griffais
5d3a0eb078 Repaint on possible connector hotplug 2021-09-02 17:18:13 -07:00
Pierre-Loup A. Griffais
8782dc2cd1 drm: Always explicitly set rotation property
This allows to transition in and out of rotation based on connector hotplug.
2021-09-02 14:43:16 -07:00
Simon Ser
5e66e9cee0 Option -O takes one arg 2021-09-02 23:29:01 +02:00
Simon Ser
268b625655 Remove short notation for some debug options
These should be only used during development, so don't deserve a
short option.
2021-09-02 22:10:55 +02:00
Simon Ser
ae785b25bf Remove -s and -N options
These were unused.
2021-09-02 21:51:32 +02:00
Simon Ser
3df6fa58bd Rename -S to --synchronous-x11 2021-09-02 21:48:43 +02:00
Joshua Ashton
ffa970ef7e Add --cursor argument 2021-09-01 18:33:57 +02:00
Joshua Ashton
0b5764195e Add setCursorImage to MouseCursor 2021-09-01 18:33:57 +02:00
Simon Ser
22323418ac wlserver: set wlroots log handler 2021-09-01 18:31:45 +02:00
Simon Ser
c034ac1f99 wlserver: use log scope 2021-09-01 18:25:24 +02:00
Simon Ser
0536dc0bb0 Repaint when taking screenshot
Closes: https://github.com/Plagman/gamescope/issues/247
2021-09-01 17:26:38 +02:00
Joshua Ashton
7812e0a726 Check correct channel for no cursor check
This was checking if the cursor has no blue before, when it should be checking the alpha.
2021-09-01 17:09:09 +02:00
Joshua Ashton
76292f01cb Fix RGB/BGR of the cursor's Vulkan image
This was ABGR before, when it should be ARGB.
2021-09-01 17:09:09 +02:00
Simon Ser
39c44a9e3c Sort options by embedded/nested mode 2021-09-01 16:08:20 +02:00
Simon Ser
5904078b2c Build optstring on the fly
Instead of having to maintain two lists of options, just generate
one from the other.
2021-09-01 15:14:08 +02:00
Simon Ser
13f792ab15 Add long options
This will allow us to introduce new long options which don't have
any short option equivalent.
2021-09-01 14:51:23 +02:00
Simon Ser
f36d436a71 Enable getopt error messages
These print something like "invalid option 'foo'". Previously
disabled because of the split main/steamcompmgr option handling.
2021-09-01 14:35:47 +02:00
Simon Ser
38b65a8b22 Error out on unknown option 2021-09-01 14:05:18 +02:00
Simon Ser
f18723d489 drm: compute per-connector CRTC mask 2021-09-01 13:23:12 +02:00
Simon Ser
b230ec29ab drm: fix crash when -O isn't provided
Closes: https://github.com/Plagman/gamescope/issues/241
2021-09-01 12:06:11 +02:00
Simon Ser
b2679838ab pipewire: add doc comments for {in,out}_buffer 2021-08-31 17:12:17 +02:00
Simon Ser
3c11ea20c3 pipewire: check pw_stream_queue_buffer return value 2021-08-31 17:12:17 +02:00
Simon Ser
56d3629b9b pipewire: add doc comment for pipewire_buffer 2021-08-31 17:12:17 +02:00
Simon Ser
fad2b9d42c pipewire: don't destroy buffers immediately when copying
When a buffer is being copied by the steamcompmgr thread, we
shouldn't destroy it immediately in the remove_buffer hook.
2021-08-31 17:12:17 +02:00
Simon Ser
5c42a6ee60 pipewire: re-use struct pipewire_buffer 2021-08-31 17:12:17 +02:00
Simon Ser
030fab39c9 pipewire: allocate our own buffers 2021-08-31 17:12:17 +02:00
Simon Ser
4b7890594a pipewire: switch to logger 2021-08-31 17:06:49 +02:00
Simon Ser
ef64b60cec Add gamescope-pipewire protocol
Can be tested with:

https://git.sr.ht/~emersion/gamescope-pipewire-demo
2021-08-31 17:06:49 +02:00
Simon Ser
59e8aa4abc pipewire: add stream process handler
This allows detecting when a buffer becomes available if we've
run out of buffers.
2021-08-31 17:06:49 +02:00
Simon Ser
5f4e6fb980 pipewire: renegotiate stream params on resize 2021-08-31 17:06:49 +02:00
Simon Ser
d6510dd931 pipewire: pump frames out of steamcompmgr 2021-08-31 17:06:49 +02:00
Simon Ser
82ef0372d5 Introduce thread-safe take_screenshot 2021-08-31 17:06:49 +02:00
Simon Ser
501eff233e Move screenshot saving out of vulkan_composite
We'll re-use the same logic for PipeWire.
2021-08-31 17:06:49 +02:00
Simon Ser
d2befe211a pipewire: handle params changed 2021-08-31 17:06:49 +02:00
Simon Ser
bb3d5a4edb pipewire: initialize stream 2021-08-31 17:06:49 +02:00
Joshua Ashton
c41dd74ef5 Add integer scale option 2021-08-30 17:15:57 -07:00
Joshua Ashton
5422061746 Add a max scale parameter 2021-08-30 17:15:57 -07:00
Simon Ser
3b14c21afc Simplify errorf_errno a bit 2021-08-25 18:16:44 +02:00
Simon Ser
c3079f7f6c rendervulkan: use log scopes 2021-08-25 18:09:39 +02:00
Simon Ser
c876abfa75 drm: replace s_drm_log with logging scope 2021-08-25 17:33:16 +02:00
Simon Ser
7cee212085 drm: use logging module 2021-08-25 17:20:23 +02:00
Simon Ser
a54b5c9ee0 Introduce basic logging module 2021-08-25 17:20:11 +02:00
Simon Ser
cba189d389 drm: allow wildcard in connector priority list 2021-08-25 16:22:14 +02:00
Simon Ser
51cfc0df06 Implement priority list for -O
e.g. `-O DP-1,VGA-1` will use DP-1 if possible, then fallback to
VGA-1, then to any other connector.
2021-08-25 16:22:14 +02:00
Simon Ser
8f733a4155 rendervulkan: add error logging to init_device 2021-08-22 18:00:10 +02:00
Simon Ser
7bdb4555ff Re-create liftoff output on CRTC change 2021-08-18 09:28:00 +02:00