sane_sysvol: fix use of uninitialized volstr
hey, that lua language server is pretty neat ^_^
This commit is contained in:
@@ -46,6 +46,7 @@ function sysvol_new()
|
|||||||
if mpv_vol == nil then
|
if mpv_vol == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local volstr = tostring(mpv_vol) .. "%"
|
||||||
|
|
||||||
local old_mpv_vol = nil
|
local old_mpv_vol = nil
|
||||||
if self.sysvol ~= nil then
|
if self.sysvol ~= nil then
|
||||||
@@ -59,7 +60,6 @@ function sysvol_new()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local volstr = tostring(mpv_vol) .. "%"
|
|
||||||
msg.debug("setting system-wide volume:", old_mpv_vol, volstr)
|
msg.debug("setting system-wide volume:", old_mpv_vol, volstr)
|
||||||
self.sysvol = (0.01*mpv_vol)^3
|
self.sysvol = (0.01*mpv_vol)^3
|
||||||
subprocess({
|
subprocess({
|
||||||
|
Reference in New Issue
Block a user