mirror of
https://github.com/ckb-next/ckb-next.git
synced 2026-10-10 12:27:21 -04:00
Merge branch 'testing' into newfx
This commit is contained in:
+1
-1
@@ -266,7 +266,7 @@ void Kb::save(){
|
||||
|
||||
void Kb::autoSave(){
|
||||
quint64 now = QDateTime::currentMSecsSinceEpoch();
|
||||
if(now >= lastAutoSave + 15 * 1000 && !CkbSettings::isBusy()){
|
||||
if(needsSave() && now >= lastAutoSave + 15 * 1000 && !CkbSettings::isBusy()){
|
||||
save();
|
||||
lastAutoSave = now;
|
||||
}
|
||||
|
||||
+4
-2
@@ -80,8 +80,6 @@ public:
|
||||
void load();
|
||||
void save();
|
||||
bool needsSave() const;
|
||||
// Auto-save every 15s (if settings have changed, and no other writes are in progress)
|
||||
void autoSave();
|
||||
|
||||
void hwSave();
|
||||
|
||||
@@ -104,8 +102,12 @@ signals:
|
||||
void fwUpdateFinished(bool succeeded);
|
||||
|
||||
public slots:
|
||||
// Send lighting and settings to the driver
|
||||
void frameUpdate();
|
||||
|
||||
// Auto-save every 15s (if settings have changed, and no other writes are in progress)
|
||||
void autoSave();
|
||||
|
||||
private slots:
|
||||
// Processes lines read from the notification node
|
||||
void readNotify(QString line);
|
||||
|
||||
@@ -141,6 +141,7 @@ void KbManager::scanKeyboards(){
|
||||
emit kbConnected(kb);
|
||||
kb->load();
|
||||
connect(_eventTimer, SIGNAL(timeout()), kb, SLOT(frameUpdate()));
|
||||
connect(_scanTimer, SIGNAL(timeout()), kb, SLOT(autoSave()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user