mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 08:30:58 +00:00
Lunatic: fix 'spawn' OSD command when running with -Lopts=strict.
BUILD_LUNATIC. git-svn-id: https://svn.eduke32.com/eduke32@4376 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
246d589f46
commit
6e891eabd1
1 changed files with 9 additions and 2 deletions
|
@ -2539,10 +2539,17 @@ if (assert(concode ~= nil)) then
|
||||||
-- Propagate potentially remapped defines to the control module.
|
-- Propagate potentially remapped defines to the control module.
|
||||||
con._setuplabels(conlabels)
|
con._setuplabels(conlabels)
|
||||||
|
|
||||||
|
local function getLabelValue(str, doupper)
|
||||||
|
return conlabels[doupper and string.upper(str) or str]
|
||||||
|
end
|
||||||
|
|
||||||
ffiC.El_GetLabelValue = function(label)
|
ffiC.El_GetLabelValue = function(label)
|
||||||
local str = ffi.string(label)
|
local str = ffi.string(label)
|
||||||
local val = conlabels[str] or conlabels[string.upper(str)]
|
local ok, val = pcall(getLabelValue, str, false)
|
||||||
return type(val)=="number" and val or bit.tobit(0x80000000)
|
if (not ok or type(val)~="number") then
|
||||||
|
ok, val = pcall(getLabelValue, str, true)
|
||||||
|
end
|
||||||
|
return (ok and type(val)=="number") and val or bit.tobit(0x80000000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue