utils: Add function to get last screenshot file name

This commit is contained in:
tt2468 2022-11-17 22:16:59 -08:00
parent 815d47e2ff
commit cfa0b4363e
2 changed files with 9 additions and 0 deletions

View File

@ -181,6 +181,7 @@ namespace Utils {
std::string GetCurrentRecordOutputPath();
std::string GetLastRecordFileName();
std::string GetLastReplayBufferFileName();
std::string GetLastScreenshotFileName();
std::string DurationToTimecode(uint64_t);
}

View File

@ -111,6 +111,14 @@ std::string Utils::Obs::StringHelper::GetLastReplayBufferFileName()
return ret;
}
std::string Utils::Obs::StringHelper::GetLastScreenshotFileName()
{
char *screenshotPath = obs_frontend_get_last_screenshot();
std::string ret = screenshotPath;
bfree(screenshotPath);
return ret;
}
std::string Utils::Obs::StringHelper::DurationToTimecode(uint64_t ms)
{
uint64_t secs = ms / 1000ULL;