UI: Cleanup frontend event handling

This adds a function to OBSBasic to call on_event, so every
time a event is called, the api variable doesn't have to be
checked everytime.
This commit is contained in:
cg2121
2024-06-18 14:18:22 -05:00
committed by Lain
parent 0306effc5f
commit 89554112c1
6 changed files with 73 additions and 130 deletions

View File

@@ -57,9 +57,7 @@ ScreenshotObj::~ScreenshotObj()
main->lastScreenshot = path;
if (main->api)
main->api->on_event(
OBS_FRONTEND_EVENT_SCREENSHOT_TAKEN);
main->OnEvent(OBS_FRONTEND_EVENT_SCREENSHOT_TAKEN);
}
}
}