mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +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
|
end
|
||||||
cheat.set_index = set_index;
|
cheat.set_index = set_index;
|
||||||
cheat.set_value = function(cheat, value)
|
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
|
local chg = false
|
||||||
if math.integer(idx) == idx then
|
if math.integer(idx) == idx then
|
||||||
idx, chg = cheat:set_index(idx)
|
idx, chg = cheat:set_index(idx)
|
||||||
|
Loading…
Reference in New Issue
Block a user