Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions monitorcontrol/vcp/vcp_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,23 @@ def get_vcp_capabilities(self):
except OSError as e:
raise VCPError("failed to get VCP capabilities") from e
return cap_string.value.decode("ascii")

def save_current_settings(self):
"""
Saves the current settings to monitor NVRAM.

Raises:
VCPError: Failed to set VCP feature.
"""
self.logger.debug("SaveCurrentSettingsCommand")
try:
if not ctypes.windll.dxva2.SaveCurrentSettings(
HANDLE(self.handle)
):
raise VCPError("failed to save current settings: " + ctypes.FormatError())
except OSError as e:
raise VCPError("failed to close handle") from e

@staticmethod
def _get_physical_monitors() -> Iterator[Tuple[HANDLE, str]]:
"""
Expand Down
Loading