File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -175,8 +175,18 @@ void DRTPlugin::savePrefs() {
175
175
}
176
176
}
177
177
178
+ void DRTPlugin::saveAllRefs () {
179
+ char system_path_c[1000 ];
180
+ XPLMGetSystemPath (system_path_c);
181
+ lb::filesystem::path system_path (system_path_c);
182
+ lb::filesystem::path output_dir = system_path / " Output" / " preferences" ;
183
+
184
+ refs.saveToFile (output_dir / " drt_last_run_datarefs.txt" , output_dir / " drt_last_run_commandrefs.txt" );
185
+ }
186
+
178
187
DRTPlugin::~DRTPlugin () {
179
188
savePrefs ();
189
+ saveAllRefs ();
180
190
}
181
191
182
192
void DRTPlugin::openAboutWindow () {
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ class DRTPlugin: public Plugin {
58
58
void handleMessage (intptr_t inMessage, void * inParam);
59
59
60
60
RefRecords & getRefs () { return refs; }
61
+
62
+ void saveAllRefs ();
61
63
};
62
64
63
65
extern std::unique_ptr<DRTPlugin> plugin;
You can’t perform that action at this time.
0 commit comments