mirror of
https://github.com/holub/mame
synced 2025-07-01 00:09:18 +03:00
plugin/cheat: subtract min before dividing
This commit is contained in:
parent
35bfe62b59
commit
692ff2c06f
@ -569,7 +569,7 @@ function cheat.startplugin()
|
||||
end
|
||||
cheat.set_index = set_index;
|
||||
cheat.set_value = function(cheat, value)
|
||||
local idx = (value / cheat.parameter.step) + 1
|
||||
local idx = ((value - cheat.parameter.min) / cheat.parameter.step) + 1
|
||||
local chg = false
|
||||
if math.integer(idx) == idx then
|
||||
idx, chg = cheat:set_index(idx)
|
||||
|
Loading…
Reference in New Issue
Block a user