Reflect language and color scheme changes in global config in manager and all its VMs

This commit is contained in:
Cacodemon345
2025-08-28 17:56:33 +06:00
parent 4f81c12b81
commit 30524acbbd
22 changed files with 194 additions and 44 deletions

View File

@@ -23,6 +23,7 @@
extern "C" {
#include "86box/plat.h"
#include "86box/config.h"
}
VMManagerClientSocket::VMManagerClientSocket(QObject* obj) : server_connected(false)
@@ -183,6 +184,15 @@ VMManagerClientSocket::jsonReceived(const QJsonObject &json)
case VMManagerProtocol::ManagerMessage::RequestStatus:
qDebug("Status request command received from manager");
break;
case VMManagerProtocol::ManagerMessage::GlobalConfigurationChanged:
{
config_load_global();
#ifdef Q_OS_WINDOWS
void selectDarkMode();
selectDarkMode();
#endif
break;
}
default:
qDebug("Unknown client message type received:");
qDebug() << json;
@@ -248,6 +258,12 @@ VMManagerClientSocket::clientRunningStateChanged(VMManagerProtocol::RunningState
sendMessageWithObject(VMManagerProtocol::ClientMessage::RunningStateChanged, extra_object);
}
void
VMManagerClientSocket::globalConfigurationChanged() const
{
sendMessage(VMManagerProtocol::ClientMessage::GlobalConfigurationChanged);
}
void
VMManagerClientSocket::configurationChanged() const
{