mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-06 15:46:13 -05:00
UI/obs-frontend-api: Return allocated strings for new funcs
8dda8d3500 added a few functions to get the last
recording/replay/screenshot path, but it should return allocations
because it's possible for the data to be modified at a later point.
This commit is contained in:
@@ -647,19 +647,19 @@ struct OBSStudioAPI : obs_frontend_callbacks {
|
||||
return App()->IsThemeDark();
|
||||
}
|
||||
|
||||
const char *obs_frontend_get_last_recording(void) override
|
||||
char *obs_frontend_get_last_recording(void) override
|
||||
{
|
||||
return main->outputHandler->lastRecordingPath.c_str();
|
||||
return bstrdup(main->outputHandler->lastRecordingPath.c_str());
|
||||
}
|
||||
|
||||
const char *obs_frontend_get_last_screenshot(void) override
|
||||
char *obs_frontend_get_last_screenshot(void) override
|
||||
{
|
||||
return main->lastScreenshot.c_str();
|
||||
return bstrdup(main->lastScreenshot.c_str());
|
||||
}
|
||||
|
||||
const char *obs_frontend_get_last_replay(void) override
|
||||
char *obs_frontend_get_last_replay(void) override
|
||||
{
|
||||
return main->lastReplay.c_str();
|
||||
return bstrdup(main->lastReplay.c_str());
|
||||
}
|
||||
|
||||
void on_load(obs_data_t *settings) override
|
||||
|
||||
Reference in New Issue
Block a user