mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 17:27:32 +00:00
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:
+23
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user