Add workqueue system
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "ToggleHiresScroll.h"
|
||||
#include "../Device.h"
|
||||
#include "../util/log.h"
|
||||
#include "../util/thread.h"
|
||||
#include "../util/task.h"
|
||||
#include "../backend/hidpp20/features/ReprogControls.h"
|
||||
|
||||
using namespace logid::actions;
|
||||
@@ -40,7 +40,7 @@ void ToggleHiresScroll::press()
|
||||
_pressed = true;
|
||||
if(_hires_scroll)
|
||||
{
|
||||
thread::spawn([hires=this->_hires_scroll](){
|
||||
task::spawn([hires=this->_hires_scroll](){
|
||||
auto mode = hires->getMode();
|
||||
mode ^= backend::hidpp20::HiresScroll::HiRes;
|
||||
hires->setMode(mode);
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include "ToggleSmartShift.h"
|
||||
#include "../Device.h"
|
||||
#include "../backend/hidpp20/features/ReprogControls.h"
|
||||
#include "../util/thread.h"
|
||||
#include "../util/task.h"
|
||||
|
||||
using namespace logid::actions;
|
||||
using namespace logid::backend;
|
||||
@@ -39,7 +39,7 @@ void ToggleSmartShift::press()
|
||||
_pressed = true;
|
||||
if(_smartshift)
|
||||
{
|
||||
thread::spawn([ss=this->_smartshift](){
|
||||
task::spawn([ss=this->_smartshift](){
|
||||
auto status = ss->getStatus();
|
||||
status.setActive = true;
|
||||
status.active = !status.active;
|
||||
|
Reference in New Issue
Block a user