mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 05:26:47 +00:00
Add some more stuff to hwdetect, because there can never be too much
This was SVN commit r8951.
This commit is contained in:
@@ -164,6 +164,13 @@ template<> jsval ScriptInterface::ToJSVal<u32>(JSContext* cx, const u32& val)
|
||||
return rval;
|
||||
}
|
||||
|
||||
template<> jsval ScriptInterface::ToJSVal<u64>(JSContext* cx, const u64& val)
|
||||
{
|
||||
jsval rval = JSVAL_VOID;
|
||||
JS_NewNumberValue(cx, (double)val, &rval); // ignore return value
|
||||
return rval;
|
||||
}
|
||||
|
||||
// NOTE: we can't define a jsval specialisation, because that conflicts with integer types
|
||||
template<> jsval ScriptInterface::ToJSVal<CScriptVal>(JSContext* UNUSED(cx), const CScriptVal& val)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user