Screencast wlroots based compositors

This commit is contained in:
Loki 2021-08-25 16:09:42 +02:00
commit ec184fb2ab
13 changed files with 972 additions and 54 deletions

View file

@ -295,7 +295,7 @@ public:
auto file = entry.path().filename();
auto filestring = file.generic_u8string();
if(std::string_view { filestring }.substr(0, 4) != "card"sv) {
if(filestring.size() < 4 || std::string_view { filestring }.substr(0, 4) != "card"sv) {
continue;
}
@ -464,7 +464,7 @@ public:
return 0;
}
capture_e capture(snapshot_cb_t &&snapshot_cb, std::shared_ptr<img_t> img, bool *cursor) {
capture_e capture(snapshot_cb_t &&snapshot_cb, std::shared_ptr<img_t> img, bool *cursor) override {
auto next_frame = std::chrono::steady_clock::now();
while(img) {