*[bug/volume][amd64]fix changeVolume cause stack smashing

[amd64]cint being defined as int32 cause stack smashing
or unsupported format for accessing property
This commit is contained in:
Anton 2024-04-11 12:41:08 +01:00
parent 7f35330d6b
commit 26f9538661
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ proc mute*(ctx; a: bool) =
var val: cint = if a: 1 else: 0
cE ctx.setProperty("mute", fmtFlag, addr val)
proc volume*(ctx; a: bool): cint =
var volumeChanged: cint
proc volume*(ctx; a: bool): int =
var volumeChanged: int
cE ctx.getProperty("volume", fmtInt64,
addr volumeChanged)
if a: volumeChanged += 5 else: volumeChanged -= 5