Copy server invite code to the clipboard automatically

This commit is contained in:
Sergii Pylypenko
2021-12-10 01:40:51 +02:00
parent 6c28ef9960
commit 9b2e51b755
4 changed files with 23 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
#include "../rev.h"
#include "../settings_type.h"
#include "../strings_func.h"
#include "../video/video_driver.hpp"
#include "../window_func.h"
#include "../window_type.h"
#include "network.h"
@@ -193,6 +194,7 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_REGISTER_ACK(Packet *p)
* and _settings_client.network.server_invite_code contains the one we will
* attempt to re-use when registering again. */
_network_server_invite_code = _settings_client.network.server_invite_code;
VideoDriver::GetInstance()->SetClipboardContents(_network_server_invite_code);
SetWindowDirty(WC_CLIENT_LIST, 0);