MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / ProcessSwitchWorkMode

Method ProcessSwitchWorkMode

src/render/plugins/plugin_net_event_router.cpp:424–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422 }
423
424 void PluginNetEventRouter::ProcessSwitchWorkMode(std::shared_ptr<Message>&& msg) {
425 app_->PostGlobalTask([=, this]() {
426 auto wm = msg->work_mode();
427 auto plugin = app_->GetWorkingMonitorCapturePlugin();
428 if (!plugin) {
429 LOGE("Working monitor capture is empty!");
430 return;
431 }
432 if (wm.mode() == SwitchWorkMode::kWork) {
433 plugin->SetCaptureFps(30);
434 } else if (wm.mode() == SwitchWorkMode::kGame) {
435 plugin->SetCaptureFps(60);
436 }
437 });
438 }
439
440 void PluginNetEventRouter::ProcessSwitchFullColorMode(std::shared_ptr<Message>&& msg) {
441 auto sw = msg->switch_full_color_mode();

Callers

nothing calls this directly

Calls 3

PostGlobalTaskMethod · 0.80
SetCaptureFpsMethod · 0.45

Tested by

no test coverage detected