Skip to content

Commit

Permalink
Use vkcube-wayland if wayland is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamimgois committed Feb 15, 2025
1 parent 960f748 commit 5ab401f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
6 changes: 3 additions & 3 deletions overlayunit.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -3516,13 +3516,13 @@ object goverlayform: Tgoverlayform
Height = 611
Top = 0
Width = 784
ActivePage = presetTabSheet
ActivePage = extrasTabSheet
Font.Color = clWhite
Font.Height = -13
Font.Name = 'Noto Sans'
Font.Quality = fqAntialiased
ParentFont = False
TabIndex = 0
TabIndex = 4
TabOrder = 2
object presetTabSheet: TTabSheet
Caption = 'Presets'
Expand Down Expand Up @@ -214828,7 +214828,7 @@ object goverlayform: Tgoverlayform
AnchorSideLeft.Control = extrasTabSheet
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = extrasTabSheet
Left = 32
Left = 0
Height = 360
Top = 0
Width = 780
Expand Down
32 changes: 24 additions & 8 deletions overlayunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ Tgoverlayform = class(TForm)
GPUAVGLOAD, GPULOADCHANGE, GPULOADCOLOR , GPULOADVALUE, VRAM, VRAMCOLOR, IOCOLOR, GPUFREQ, GPUMEMFREQ, GPUTEMP, GPUMEMTEMP, GPUJUNCTEMP, GPUFAN, GPUPOWER, GPUTHR, GPUTHRG, GPUMODEL, VULKANDRIVER, GPUVOLTAGE: string; //metrics tab - GPU
CPUAVGLOAD, CPULOADCORE, CPULOADCHANGE, CPUCOLOR, CPULOADCOLOR, CPULOADVALUE, CPUCOREFREQ, CPUTEMP, CORELOADTYPE, CPUPOWER, GPUTEXT, GPUCOLOR, CPUTEXT, RAM, RAMCOLOR, IOSTATS, IOREAD, IOWRITE, SWAP, PROCMEM: string; //metrics tab - CPU
FPS, FPSAVG,FRAMETIMING, SHOWFPSLIM, FRAMECOUNT, FRAMETIMEC, HISTOGRAM, FPSLIM, FPSLIMMET, FPSCOLOR, FPSVALUE, FPSCHANGE, VSYNC, GLVSYNC, FILTER, AFFILTER, MIPMAPFILTER, FPSLIMTOGGLE, OFFSET: string; //performance tab
DISTROINFO1, DISTROINFO2, DISTROINFO3, DISTROINFO4, DISTRONAME, ARCH, RESOLUTION, SESSION, SESSIONTXT, TIME, WINE, WINECOLOR, ENGINE, ENGINECOLOR, ENGINESHORT, HUDVERSION,GAMEMODE: string; //extra tab
DISTROINFO1, DISTROINFO2, DISTROINFO3, DISTROINFO4, DISTRONAME, ARCH, RESOLUTION, SESSION, SESSIONTXT, USERSESSION, TIME, WINE, WINECOLOR, ENGINE, ENGINECOLOR, ENGINESHORT, HUDVERSION,GAMEMODE: string; //extra tab
VKBASALT, FCAT, FSR, HDR, WINESYNC, VPS, FTEMP, REFRESHRATE, BATTERY, BATTERYCOLOR, BATTERYWATT, BATTERYTIME, DEVICE,DEVICEICON, MEDIA, MEDIACOLOR, CUSTOMCMD1, CUSTOMCMD2, LOGFOLDER, LOGDURATION, LOGDELAY, LOGINTERVAL, LOGTOGGLE, LOGVER, LOGAUTO, NETWORK: string; //extratab


Expand Down Expand Up @@ -724,13 +724,7 @@ procedure Tgoverlayform.FormCreate(Sender: TObject);
vkbasaltsel := false;
vkbasaltPanel.Visible:=false;

// Start vkcube (vulkan demo)
Process := TProcess.Create(nil);
Process.Executable := 'sh';
Process.Parameters.Add('-c');
Process.Parameters.Add('mangohud vkcube');
Process.Options := [poUsePipes];
Process.Execute;


// Define important file paths
GOVERLAYFOLDER:= '$HOME/.config/goverlay/' ;
Expand All @@ -739,7 +733,29 @@ procedure Tgoverlayform.FormCreate(Sender: TObject);
CUSTOMCFGFILE:= '$HOME/.config/MangoHud/custom.conf' ;
FONTFOLDER := '/usr/share/fonts/';
USERHOME := GetEnvironmentVariable('HOME') ;
USERSESSION := GetEnvironmentVariable('XDG_SESSION_TYPE') ;


// Start vkcube (vulkan demo)

if USERSESSION = 'wayland' then
begin
Process := TProcess.Create(nil);
Process.Executable := 'sh';
Process.Parameters.Add('-c');
Process.Parameters.Add('mangohud vkcube-wayland');
Process.Options := [poUsePipes];
Process.Execute;
end
else
begin
Process := TProcess.Create(nil);
Process.Executable := 'sh';
Process.Parameters.Add('-c');
Process.Parameters.Add('mangohud vkcube');
Process.Options := [poUsePipes];
Process.Execute;
end;


// Substitui $HOME pelo caminho real do diretório do usuário
Expand Down

0 comments on commit 5ab401f

Please sign in to comment.