Extract helpers into BoardUtils, WisdomBuilder, UISync, PlatformUtils

- BoardUtils: BoardTypeName (removes duplication with DeviceForm)
- WisdomBuilder: TWisdomBuildThread + TWisdomProgressDialog
- UISync: TDeviceFoundSync/TStatusUISync/TDDCSeqSync via callbacks
  (avoids circular dependency, removes TObject casts)
- PlatformUtils: HasOpenGLSpectrumSwitch + CurrentScreenDPI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 19:15:51 +03:00
co-authored by Claude Sonnet 4.6
parent aa252cb741
commit 9716b88b0c
7 changed files with 305 additions and 270 deletions
+23 -1
View File
@@ -11,11 +11,13 @@ unit PlatformUtils;
interface
function QtPlatformAllowsOpenGLControls: Boolean;
function HasOpenGLSpectrumSwitch: Boolean;
function CurrentScreenDPI: Integer;
implementation
uses
SysUtils;
SysUtils, Forms;
function QtPlatformAllowsOpenGLControls: Boolean;
var
@@ -39,4 +41,24 @@ begin
Result := SessionType <> 'wayland';
end;
function HasOpenGLSpectrumSwitch: Boolean;
var
I: Integer;
S: string;
begin
Result := False;
for I := 1 to ParamCount do
begin
S := LowerCase(ParamStr(I));
if (S = '--opengl') or (S = '-opengl') or (S = '/opengl') then
Exit(True);
end;
end;
function CurrentScreenDPI: Integer;
begin
Result := Screen.PixelsPerInch;
if Result <= 0 then Result := 96;
end;
end.