Add option to disable sound

This commit is contained in:
Empathic Qubit 2021-04-29 09:32:55 -04:00
parent e1b6f2937b
commit 5c03d02c0e
3 changed files with 9 additions and 3 deletions

3
.gitignore vendored
View file

@ -7,4 +7,5 @@ crashsave*
*.lsvs
config.lua
*.sfc
watchexec*
watchexec*
.VSCodeCounter/

View file

@ -35,7 +35,8 @@ _M.Filename = _M.PoolDir .. _M.State[1]
_M.StartPowerup = 0
_M.NeatConfig = {
Threads = 2,
DisableSound = false,
Threads = 7,
--Filename = "DP1.state",
SaveFile = _M.Filename .. ".pool",

View file

@ -387,7 +387,11 @@ local function initializeRun(_M, after)
settings.set_speed("turbo")
-- XXX Does this actually work or only affects new VM loads?
settings.set('lua-maxmem', 1024)
exec('enable-sound off')
local enableSound = 'on'
if config.NeatConfig.DisableSound then
enableSound = 'off'
end
exec('enable-sound '..enableSound)
gui.subframe_update(false)
table.insert(_M.runInitialized, after)
movie.unsafe_rewind(rew)