@@ -1625,13 +1625,14 @@ procedure Tgoverlayform.vkbasaltLabelClick(Sender: TObject);
16251625 begin
16261626 SendNotification(' Goverlay' , ' PasCube was not located, using vkcube instead' , GetIconFile);
16271627
1628- if IsRunningInFlatpak then
1629- begin
1630- if USERSESSION = ' wayland' then
1631- ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube-wayland &' )
1632- else
1633- ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube &' );
1634- end
1628+ if IsRunningInFlatpak then
1629+ begin
1630+ // In Flatpak, use vkcube-wayland binary if available and on Wayland
1631+ if (USERSESSION = ' wayland' ) and IsCommandAvailable(' vkcube-wayland' ) then
1632+ ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube-wayland &' )
1633+ else
1634+ ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube &' );
1635+ end
16351636 else
16361637 begin
16371638 if USERSESSION = ' wayland' then
@@ -3663,10 +3664,11 @@ procedure Tgoverlayform.FormCreate(Sender: TObject);
36633664 else if IsCommandAvailable(' vkcube' ) then
36643665 begin
36653666 SendNotification(' Goverlay' , ' PasCube was not located, using vkcube instead' , GetIconFile);
3666- if USERSESSION = ' wayland' then
3667- ExecuteGUICommand(' MANGOHUD=1 vkcube --wsi wayland &' )
3667+ // In Flatpak, vkcube auto-detects or doesn't support --wsi flag
3668+ if (USERSESSION = ' wayland' ) and IsCommandAvailable(' vkcube-wayland' ) then
3669+ ExecuteGUICommand(' MANGOHUD=1 vkcube-wayland &' )
36683670 else
3669- ExecuteGUICommand(' MANGOHUD=1 vkcube &' );
3671+ ExecuteGUICommand(' MANGOHUD=1 vkcube &' );
36703672 end
36713673 else
36723674 begin
@@ -3685,9 +3687,9 @@ procedure Tgoverlayform.FormCreate(Sender: TObject);
36853687 begin
36863688 SendNotification(' Goverlay' , ' PasCube was not located, using vkcube instead' , GetIconFile);
36873689 if USERSESSION = ' wayland' then
3688- ExecuteGUICommand(' mangohud vkcube --wsi wayland &' )
3690+ ExecuteGUICommand(' MANGOHUD=1 vkcube --wsi wayland &' )
36893691 else
3690- ExecuteGUICommand(' mangohud vkcube &' );
3692+ ExecuteGUICommand(' mangohud vkcube &' );
36913693 end
36923694 else
36933695 begin
@@ -4462,8 +4464,32 @@ procedure Tgoverlayform.runvkbasaltItemClick(Sender: TObject);
44624464begin
44634465
44644466
4465- // Start pasCube
4466- RunPasCube;
4467+ // Check if running in Flatpak
4468+ if IsRunningInFlatpak then
4469+ begin
4470+ // FLATPAK MODE
4471+ if IsCommandAvailable(' pascube' ) then
4472+ begin
4473+ ExecuteGUICommand(' MANGOHUD=1 pascube &' );
4474+ end
4475+ else
4476+ begin
4477+ // None found
4478+ SendNotification(' Goverlay' , ' PasCube not located.' , GetIconFile);
4479+ end ;
4480+ end
4481+ else
4482+ begin
4483+ // NATIVE MODE
4484+ if IsCommandAvailable(' pascube' ) then
4485+ begin
4486+ ExecuteGUICommand(' MANGOHUD=1 pascube &' );
4487+ end
4488+ else
4489+ begin
4490+ SendNotification(' Goverlay' , ' PasCube not located.' , GetIconFile);
4491+ end ;
4492+ end ;
44674493
44684494end ;
44694495
@@ -4496,17 +4522,16 @@ procedure Tgoverlayform.runvkcubeItemClick(Sender: TObject);
44964522 // In Flatpak, use vkcube-wayland binary instead of vkcube --wsi wayland
44974523 if IsRunningInFlatpak then
44984524 begin
4499- if USERSESSION = ' wayland' then
4500- ExecuteGUICommand(' MANGOHUD=1 vkcube-wayland &' )
4501- else
4502- ExecuteGUICommand(' MANGOHUD=1 vkcube &' );
4525+ // In Flatpak, vkcube auto-detects WSI
4526+ if (USERSESSION = ' wayland' ) and IsCommandAvailable(' vkcube-wayland' ) then
4527+ ExecuteGUICommand(' MANGOHUD=1 vkcube-wayland &' )
4528+ else
4529+ ExecuteGUICommand(' MANGOHUD=1 vkcube &' );
45034530 end
45044531 else
45054532 begin
45064533 if USERSESSION = ' wayland' then
4507- ExecuteGUICommand(' mangohud vkcube --wsi wayland &' )
4508- else
4509- ExecuteGUICommand(' mangohud vkcube &' );
4534+ ExecuteGUICommand(' MANGOHUD=1 vkcube &' );
45104535 end ;
45114536end ;
45124537
@@ -5906,10 +5931,11 @@ procedure Tgoverlayform.saveBitBtnClick(Sender: TObject);
59065931
59075932 if IsRunningInFlatpak then
59085933 begin
5909- if USERSESSION = ' wayland' then
5910- ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube-wayland &' )
5934+ // In Flatpak, vkcube auto-detects WSI
5935+ if (USERSESSION = ' wayland' ) and IsCommandAvailable(' vkcube-wayland' ) then
5936+ ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube-wayland &' )
59115937 else
5912- ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube &' );
5938+ ExecuteGUICommand(' VKBASALT_LOG_FILE=' + VKBASALTFOLDER + ' /' + ' vkBasalt.log ENABLE_VKBASALT=1 MANGOHUD=1 vkcube &' );
59135939 end
59145940 else
59155941 begin
0 commit comments