Add display refresh rate detection and display
Some checks failed
Validate / validate (push) Failing after 8s
Some checks failed
Validate / validate (push) Failing after 8s
- Added get_monitor_refresh_rates() function in monitor_names.py using Windows ctypes/DEVMODE to detect monitor refresh rates - Updated DisplayInfo dataclass and Pydantic schema to include refresh_rate field (in Hz) - Modified get_available_displays() to detect and include refresh rates (defaults to 60Hz on non-Windows or if detection fails) - Added refresh rate display in Web UI between Resolution and Position - Added translations for refresh rate label (displays.refresh_rate) in English and Russian locales - Cross-platform compatible: gracefully falls back to 60Hz default on non-Windows systems Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,7 @@ class DisplayInfo(BaseModel):
|
||||
x: int = Field(description="Display X position")
|
||||
y: int = Field(description="Display Y position")
|
||||
is_primary: bool = Field(default=False, description="Whether this is the primary display")
|
||||
refresh_rate: int = Field(description="Display refresh rate in Hz")
|
||||
|
||||
|
||||
class DisplayListResponse(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user