Feature: Add power management to keep macOS client always responsive

This commit is contained in:
yuanyuanxiang
2026-05-01 21:43:55 +02:00
parent 36ba9ccc1d
commit 3607f1d768
3 changed files with 61 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
#import <CoreGraphics/CoreGraphics.h>
#import <dispatch/dispatch.h>
#import <IOKit/pwr_mgt/IOPMLib.h>
#import "../client/IOCPClient.h"
#include <vector>
#include <atomic>
@@ -132,4 +133,7 @@ private:
// Input handler for mouse/keyboard control
std::unique_ptr<InputHandler> m_inputHandler;
// Power management: prevent display sleep during remote desktop
IOPMAssertionID m_displayAssertionID;
};