Rewrite overlay on Win32 (one borderless topmost window per monitor) + logging

- fixes second monitor not fully covered (gap at top): each monitor now gets its
  own window sized exactly to its rcMonitor in device coords, with per-monitor V2
  DPI awareness, so it covers the full screen regardless of layout/DPI
- dropped pygame; black fill + 'ESC - exit' hint drawn via GDI
- global ESC via low-level keyboard hook (works without window focus)
- logging to %TEMP%\black_screen_dim.log (start, monitor rects, brightness, errors)
- requirements.txt: pygame removed
This commit is contained in:
Hermes Agent committed 2026-09-16 16:21:36 +02:00
1 parent 87bdbd7226
commit 0e88bf62f5
3 files changed
+340 -118

No files matched your search

+2 -1
View File
@@ -20,8 +20,9 @@ pyinstaller "Black Screen Dim.spec"
Готовый exe — в `dist\Black Screen Dim\`.
## Зависимости
- `pygame` — окно и отрисовка
- `screen-brightness-control` — управление яркостью (только Windows)
- чёрная заливка экрана — напрямую через Win32 API (ctypes, входит в стандартную библиотеку), pygame больше не нужен
- лог пишется в `%TEMP%\black_screen_dim.log`
> Управление яркостью работает только на Windows. На других ОС приложение
> просто покажет чёрный экран без изменения яркости.