MangoHud icon indicating copy to clipboard operation
MangoHud copied to clipboard

obs recording stats hud element

Open Denzy7 opened this issue 4 months ago • 7 comments

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) Screenshot_20251018_114805

when obs is opened (ready state) Screenshot_20251018_114827

recording in progress! Screenshot_20251018_114844

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

Denzy7 avatar Sep 13 '25 14:09 Denzy7

Preferably, communication with OBS should be handled by a self-contained class, exposed through a unique pointer that hud elements query for information

flightlessmango avatar Sep 14 '25 08:09 flightlessmango

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

Denzy7 avatar Oct 09 '25 09:10 Denzy7

At the very least we don't want to do things in hud elements except rendering output

flightlessmango avatar Oct 09 '25 09:10 flightlessmango

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

Denzy7 avatar Oct 09 '25 10:10 Denzy7

Added some more QOL changes. Looks ready for a review

Denzy7 avatar Oct 14 '25 08:10 Denzy7

Hello! Latest commits address the issues in the first review. Now ready for another review

Denzy7 avatar Oct 18 '25 08:10 Denzy7

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

Denzy7 avatar Nov 02 '25 09:11 Denzy7