Commit graph

864 commits

Author SHA1 Message Date
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
Simon Ser
e075ac065f ci: add PipeWire to dependencies 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
Simon Ser
5b776be6d2 Move the run global to main.hpp
It's used by both wlserver and steamcompmgr.
2021-08-10 12:05:49 +02:00
Simon Ser
24bea3406a Make the run global atomic
It's written to from multiple threads.
2021-08-10 12:02:26 +02:00
Simon Ser
0708ab06d2 steamcompmgr: nudge when children have exited
Make sure to wake up steamcompmgr when all children are gone.
Otherwise the steamcompmgr thread will get stuck.
2021-08-10 12:00:48 +02:00
Simon Ser
a038e881c2 steamcompmgr: stop capturing pid in waitThread 2021-08-10 11:57:39 +02:00
Simon Ser
ae66c6037b steamcompmgr: wait all child processes
Closes: https://github.com/Plagman/gamescope/issues/233
2021-08-10 11:56:45 +02:00
Jan Beich
82db27c6fc drm: don't use private wlroots prototype for bundled cvt
src/cvt.cpp:23:10: fatal error: 'backend/drm/cvt.h' file not found
 #include "backend/drm/cvt.h"
          ^~~~~~~~~~~~~~~~~~~
2021-08-07 15:38:17 +02:00
Simon Ser
5c358cef71 ci: build with clang 2021-08-05 10:35:40 +02:00
Simon Ser
ca75f213aa ci: add GitHub action 2021-08-05 10:32:13 +02:00
Simon Ser
f1a340b029 drm: DisplayPort → DP 2021-08-03 15:49:02 +02:00
Simon Ser
4bc7b4952b Remove unnecessary global variables 2021-08-03 15:46:24 +02:00
Simon Ser
538610154c wlserver: make more variables static 2021-08-03 11:33:12 +02:00
Simon Ser
482f1f3b0b wlserver: stop using headless backend for keyboard
The headless backend forces a wlroots renderer to be initialized.
Stop using it, so that it's easier to get rid of the headless
backend altogether.
2021-08-03 11:04:00 +02:00
Simon Ser
ee96a669ef wlserver: check wlr_output_commit return value 2021-08-03 10:42:54 +02:00
Simon Ser
2597c25ec6 readme: mention that Intel is supported 2021-08-03 10:37:27 +02:00