Cleanup screenshot helper

This commit is contained in:
WarmUpTill
2024-09-22 10:09:03 +02:00
committed by WarmUpTill
parent c39ea0854a
commit 55ab096e49
9 changed files with 165 additions and 205 deletions

View File

@@ -32,8 +32,8 @@ void MacroActionScreenshot::CustomScreenshot(OBSWeakSource &source)
return;
}
auto s = obs_weak_source_get_source(source);
_screenshot.~ScreenshotHelper();
new (&_screenshot) ScreenshotHelper(s, QRect(), false, 0, true, _path);
_screenshot.~Screenshot();
new (&_screenshot) Screenshot(s, QRect(), false, 0, true, _path);
obs_source_release(s);
}
@@ -230,11 +230,7 @@ void MacroActionScreenshotEdit::UpdateEntryData()
void MacroActionScreenshotEdit::SceneChanged(const SceneSelection &s)
{
if (_loading || !_entryData) {
return;
}
auto lock = LockContext();
GUARD_LOADING_AND_LOCK();
_entryData->_scene = s;
emit HeaderInfoChanged(
QString::fromStdString(_entryData->GetShortDesc()));

View File

@@ -42,7 +42,7 @@ private:
void FrontendScreenshot(OBSWeakSource &);
void CustomScreenshot(OBSWeakSource &);
ScreenshotHelper _screenshot;
Screenshot _screenshot;
static bool _registered;
static const std::string id;