obs recording stats hud element
feature request from #448
requires libobs and libobs-frontend-api, which comes bundled with obs.
currently using shm to sync
issues:
- it could be a separate plugin since all comms are thru shm
- multiple instances of mangohud may mess with state
- i think it could some styling too!
initially (inactive state)
when obs is opened (ready state)
recording in progress!
if no shared memory is detected (on win32 or disabled by kernel) error status is shown if mangohud was compiled without obs support, a spdlog warning is printed and disabled status is shown
Preferably, communication with OBS should be handled by a self-contained class, exposed through a unique pointer that hud elements query for information
I have made some changes in the latest commit. It's really difficult to expose a class with C++ and have it play nicely with OBS since it expects plugins to be written in C. The class hosts a struct which OBS uses to fill in the relevant info
At the very least we don't want to do things in hud elements except rendering output
Yeah. I'll move some of the initialization code to the class. Also I'll add the compiler guards for linux. I'm yet to do a proper Win32 shared memory implementation
Added some more QOL changes. Looks ready for a review
Hello! Latest commits address the issues in the first review. Now ready for another review
I've tested on arch and checked with the ubuntu CI build. Seems ok. I've checked the depends on Fedora and Solus on their online package search and the needed file are there. But on OpenSUSE I've no idea maybe someone could volunteer to test it