Guard OpenGL mode on native Wayland

This commit is contained in:
2026-05-26 11:06:55 +03:00
parent 08c5f0ddb7
commit 762fad420e
3 changed files with 63 additions and 0 deletions
+17
View File
@@ -35,6 +35,7 @@ uses
CATEngine, CATSerial, CATTcp,
SpectrumView, SpectrumViewOpengl,
StatusBar,
PlatformUtils,
WinFirewall;
const
@@ -1469,6 +1470,22 @@ begin
FSplitterDrag := False;
FUseOpenGLSpectrum := HasOpenGLSpectrumSwitch;
if FUseOpenGLSpectrum and (not QtPlatformAllowsOpenGLControls) then
begin
MessageDlg('OpenGL rendering disabled',
'OpenGL rendering is not available in the current Qt Wayland mode.' + LineEnding +
LineEnding +
'The Lazarus/LCL Qt6 OpenGL control used by EWSDR requires an X11 display handle, ' +
'but the native Wayland backend does not provide one. Using it here can cause an access violation during startup.' +
LineEnding +
LineEnding +
'To run EWSDR with OpenGL rendering, start it through XWayland:' + LineEnding +
'QT_QPA_PLATFORM=xcb ./ewsdr --opengl' + LineEnding +
LineEnding +
'OpenGL rendering will be disabled for this session.',
mtWarning, [mbOK], 0);
FUseOpenGLSpectrum := False;
end;
if FUseOpenGLSpectrum then
FWaterfallFrameInterval := 1;
if FUseOpenGLSpectrum then