diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/main.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -125,8 +125,6 @@ If you installed GPU Screen Recorder from AUR or from source and you are running It's configured with `$HOME/.config/gpu-screen-recorder.env` (create it if it doesn't exist). You can look at [extra/gpu-screen-recorder.env](https://git.dec05eba.com/gpu-screen-recorder/plain/extra/gpu-screen-recorder.env) to see an example. You can see which variables that you can use in the `gpu-screen-recorder.env` file by looking at the `extra/gpu-screen-recorder.service` file. Note that all of the variables are optional, you only have to set the ones that are you interested in. You can use the `scripts/save-replay.sh` script to save a replay and by default the systemd service saves videos in `$HOME/Videos`.\ -When using the `-w portal` your Wayland compositor will show a popup asking what you want to record and in some Wayland compositors you have the option to save the session (token) so that the next time you record it wont ask what you want to record. -If you want to restore the session the next time you record (to remove the popup asking you what you want to record everytime) then run GPU Screen Recorder with the `-restore-portal-session yes` option. If you are using a NVIDIA GPU then it's recommended to set PreserveVideoMemoryAllocations=1 as mentioned in the section below. # Issues ## NVIDIA diff --git a/src/main.cpp b/src/main.cpp index 3d577b4..acb4c83 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2197,8 +2197,13 @@ int main(int argc, char **argv) { replay_buffer_size_secs += std::ceil(keyint); // Add a few seconds to account of lost packets because of non-keyframe packets skipped } + // TODO: Remove strdup const char *window_str = strdup(args["-w"].value()); + if(!restore_portal_session && strcmp(window_str, "portal") == 0) { + fprintf(stderr, "gsr info: '-w portal' option used without '-restore-portal-session yes'. The previous screencast session will be ignored\n"); + } + bool wayland = false; Display *dpy = XOpenDisplay(nullptr); if (!dpy) { |