From cb0cbf6946bc85ed3f6a942e8ec07c478db1ef0f Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sun, 17 Jan 2021 18:43:19 -0600 Subject: [PATCH] Save and load json to plugins directory --- OpenRGBE131ReceiverDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRGBE131ReceiverDialog.cpp b/OpenRGBE131ReceiverDialog.cpp index 735953b..44d1227 100644 --- a/OpenRGBE131ReceiverDialog.cpp +++ b/OpenRGBE131ReceiverDialog.cpp @@ -722,7 +722,7 @@ void OpenRGBE131ReceiverDialog::on_ButtonSaveMap_clicked() /*-----------------------------------------------------*\ | Write out the JSON structure to a file | \*-----------------------------------------------------*/ - std::ofstream universe_file("E131UniverseMap.json", std::ios::out | std::ios::binary); + std::ofstream universe_file(resource_manager->GetConfigurationDirectory() + "/plugins/E131UniverseMap.json", std::ios::out | std::ios::binary); if(universe_file) { @@ -749,7 +749,7 @@ void OpenRGBE131ReceiverDialog::on_ButtonLoadMap_clicked() /*---------------------------------------------------------*\ | Open input file in binary mode | \*---------------------------------------------------------*/ - std::ifstream universe_file("E131UniverseMap.json", std::ios::in | std::ios::binary); + std::ifstream universe_file(resource_manager->GetConfigurationDirectory() + "/plugins/E131UniverseMap.json", std::ios::in | std::ios::binary); /*---------------------------------------------------------*\ | Read settings into JSON store |