add optin to delete saved license info

This commit is contained in:
Martin Michelsen
2022-06-04 22:56:18 -07:00
parent 35d9f12e0a
commit 9d2f845418
3 changed files with 8 additions and 0 deletions
+1
View File
@@ -32,6 +32,7 @@ namespace MainMenuItemID {
constexpr uint32_t PATCHES = 0x11666611;
constexpr uint32_t PROGRAMS = 0x11777711;
constexpr uint32_t DISCONNECT = 0x11888811;
constexpr uint32_t CLEAR_LICENSE = 0x11999911;
}
namespace InformationMenuItemID {
+5
View File
@@ -789,6 +789,11 @@ void process_menu_selection(shared_ptr<ServerState> s, shared_ptr<Client> c,
c->should_disconnect = true;
break;
case MainMenuItemID::CLEAR_LICENSE:
send_command(c, 0x9A, 0x04);
c->should_disconnect = true;
break;
default:
send_message_box(c, u"Incorrect menu item ID.");
break;
+2
View File
@@ -347,6 +347,8 @@ void ServerState::create_menus(shared_ptr<const JSONObject> config_json) {
}
this->main_menu.emplace_back(MainMenuItemID::DISCONNECT, u"Disconnect",
u"Disconnect", 0);
this->main_menu.emplace_back(MainMenuItemID::CLEAR_LICENSE, u"Clear license",
u"Disconnect with an\ninvalid license error\nso you can enter a\ndifferent serial\nnumber, access key,\nor password", 0);
try {
this->welcome_message = decode_sjis(d.at("WelcomeMessage")->as_string());