diff options
| author | a1xd <[email protected]> | 2021-04-06 01:21:42 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-04-06 01:21:42 -0400 |
| commit | 7c1f14845bc948e9ea25908e96099203d9433a69 (patch) | |
| tree | eadfae6ec0a775a35c29807bde3c20be8160e034 /converter/converter.cpp | |
| parent | LUT text layout (diff) | |
| download | rawaccel-7c1f14845bc948e9ea25908e96099203d9433a69.tar.xz rawaccel-7c1f14845bc948e9ea25908e96099203d9433a69.zip | |
update wrapper + writer to handle lut
grapher is building but applying options still broken for the most part
Diffstat (limited to 'converter/converter.cpp')
| -rw-r--r-- | converter/converter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/converter/converter.cpp b/converter/converter.cpp index 7b71af3..b1761b0 100644 --- a/converter/converter.cpp +++ b/converter/converter.cpp @@ -10,6 +10,7 @@ #include <string> using namespace System; +using namespace System::IO; using namespace System::Runtime::InteropServices; using namespace Newtonsoft::Json; @@ -181,9 +182,9 @@ bool try_convert(const ia_settings_t& ia_settings) { } default: return false; } - + DriverSettings^ new_settings = Marshal::PtrToStructure<DriverSettings^>((IntPtr)&ra_settings); - auto errors = gcnew SettingsErrors(new_settings); + SettingsErrors^ errors = gcnew SettingsErrors(new_settings); if (!errors->Empty()) { Console::WriteLine("Bad settings: {0}", errors); @@ -191,12 +192,11 @@ bool try_convert(const ia_settings_t& ia_settings) { } Console::Write("Sending to driver... "); - (gcnew ManagedAccel(new_settings))->Activate(); + (gcnew ManagedAccel(gcnew ExtendedSettings(new_settings)))->Activate(); Console::WriteLine("done"); Console::Write("Generating settings.json... "); - auto json = JsonConvert::SerializeObject(new_settings, Formatting::Indented); - System::IO::File::WriteAllText("settings.json", json); + File::WriteAllText("settings.json", RaConvert::Settings(new_settings)); Console::WriteLine("done"); return true; |