diff options
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index f4eb2e6e5d..74463dc454 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -107,6 +107,11 @@ INT_PTR CALLBACK CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, GetDlgItemTextA(hwnd, IDC_USERNAME, username, SIZEOF(username));
proto->setString("Username", username);
+ if (tox_set_name(proto->tox, (uint8_t*)&username[0], strlen(username)) == 0)
+ {
+ proto->SaveToxData();
+ }
+
char dataPath[128];
GetDlgItemTextA(hwnd, IDC_DATAPATH, dataPath, SIZEOF(dataPath));
proto->setString("DataPath", dataPath);
|