Skip to content

Commit 8a24c95

Browse files
committed
docs: Add docstring to detect_gpu_and_display function
1 parent 9614f83 commit 8a24c95

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

tools/gpu_display_detector.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
1+
"""GPU and display detection for awarding legacy hardware badges."""
2+
13
import json
24
import platform
35
import subprocess
46
from datetime import datetime
57

68
def detect_gpu_and_display():
9+
"""Detects legacy GPU and display hardware and awards corresponding badges.
10+
11+
This function scans the system using lspci to detect legacy GPU and display
12+
adapters. When legacy hardware is detected, it creates badge entries for
13+
each detected device and saves them to unlocked_badges.json.
14+
15+
Supported GPU badges:
16+
- Voodoo FX (3dfx Voodoo graphics)
17+
- SLI (NVIDIA SLI)
18+
- ATI Rage Pro
19+
- Matrox
20+
- PowerVR Prophet
21+
- Amiga Warrior
22+
23+
Supported Display badges:
24+
- Hercules monochrome
25+
- CGA (Color Graphics Adapter)
26+
- XGA (Extended Graphics Array)
27+
- VGA ancestor
28+
29+
Returns:
30+
None. Results are written to unlocked_badges.json file.
31+
"""
732
badges = []
833

934
try:

0 commit comments

Comments
 (0)