UI: Implement SaveProject function

master
jp9000 2015-01-04 08:16:59 -08:00
parent 8a97199072
commit ebc2d4ab11
1 changed files with 8 additions and 3 deletions

View File

@ -597,9 +597,7 @@ void OBSBasic::OBSInit()
OBSBasic::~OBSBasic() OBSBasic::~OBSBasic()
{ {
BPtr<char> savePath(os_get_config_path("obs-studio/basic/scenes.json")); SaveProject();
SaveService();
Save(savePath);
/* XXX: any obs data must be released before calling obs_shutdown. /* XXX: any obs data must be released before calling obs_shutdown.
* currently, we can't automate this with C++ RAII because of the * currently, we can't automate this with C++ RAII because of the
@ -638,6 +636,13 @@ OBSBasic::~OBSBasic()
config_save(App()->GlobalConfig()); config_save(App()->GlobalConfig());
} }
void OBSBasic::SaveProject()
{
BPtr<char> savePath(os_get_config_path("obs-studio/basic/scenes.json"));
SaveService();
Save(savePath);
}
OBSScene OBSBasic::GetCurrentScene() OBSScene OBSBasic::GetCurrentScene()
{ {
QListWidgetItem *item = ui->scenes->currentItem(); QListWidgetItem *item = ui->scenes->currentItem();