Commit graph

693 commits

Author SHA1 Message Date
Pierre-Loup A. Griffais
21d631590a Fix build_optstring bug with long-only options requiring argument. 2021-09-10 17:46:00 -07:00
Simon Ser
97b73a8c9a readme: mention --help 2021-09-10 14:26:42 +02:00
Simon Ser
fb4ec7cb4e Drop short option for --cursor 2021-09-10 14:25:19 +02:00
Simon Ser
f8e251962c Add --help 2021-09-10 14:21:59 +02:00
Simon Ser
94f78d1b3c steamcompmgr: use log scope 2021-09-10 12:04:20 +02:00
Simon Ser
d926ea0b33 steamcompmgr: init g_nudgePipe to invalid FDs
Make sure we don't wrongly read from stdin or something.
2021-09-10 11:49:14 +02:00
Simon Ser
97746c609f steamcompmgr: remove unused environ 2021-09-10 11:48:10 +02:00
Simon Ser
ba9c46cea2 drm: disable all KMS resources at exit 2021-09-10 11:42:43 +02:00
Simon Ser
ff8c0b183b Introduce finish_drm
For now it just closes the DRM FD, but will do more soon.
2021-09-10 11:05:09 +02:00
Simon Ser
fc748ebd78 wlserver: remove wlserver_run return value
It always returns 0.
2021-09-10 11:01:54 +02:00
Simon Ser
cd0e12d050 Wait for steamcompmgr when exiting
This allows steamcompmgr to perform cleanup actions without being
hard-terminated.
2021-09-10 11:00:18 +02:00
Simon Ser
6557cdce18 build: specify explicit C++ edition 2021-09-10 10:50:41 +02:00
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
Simon Ser
6626706022 readme: add command to pull git submodules 2021-09-02 21:46:47 +02:00
Joshua Ashton
ffa970ef7e Add --cursor argument 2021-09-01 18:33:57 +02:00
Joshua Ashton
86b593b754 Add STB submodule 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