Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/mod/hwdetect/hwdetect.js
/* Copyright (C) 2015 Wildfire Games. | /* Copyright (C) 2019 Wildfire Games. | ||||
* | * | ||||
* Permission is hereby granted, free of charge, to any person obtaining | * Permission is hereby granted, free of charge, to any person obtaining | ||||
* a copy of this software and associated documentation files (the | * a copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | * "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | * without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sublicense, and/or sell copies of the Software, and to | * distribute, sublicense, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | * permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | * the following conditions: | ||||
▲ Show 20 Lines • Show All 337 Lines • ▼ Show 20 Lines | global.RunHardwareDetection = function(settings) | ||||
if (output.dialog_warnings.length) | if (output.dialog_warnings.length) | ||||
{ | { | ||||
var msg = output.dialog_warnings.join("\n\n"); | var msg = output.dialog_warnings.join("\n\n"); | ||||
Engine.DisplayErrorDialog(msg); | Engine.DisplayErrorDialog(msg); | ||||
} | } | ||||
if (output.disable_audio !== undefined) | if (output.disable_audio !== undefined) | ||||
Engine.SetDisableAudio(output.disable_audio); | Engine.SetDisableAudio(output.disable_audio); | ||||
if (output.disable_s3tc !== undefined) | |||||
Engine.SetDisableS3TC(output.disable_s3tc); | |||||
if (output.disable_shadows !== undefined) | if (output.disable_shadows !== undefined) | ||||
Stan: Should be removed if you nuke the option, shouldn't it. | |||||
Engine.SetDisableShadows(output.disable_shadows); | Engine.ConfigDB_CreateValue("hwdetect", "shadows", !output.disable_shadows); | ||||
if (output.disable_shadowpcf !== undefined) | if (output.disable_shadowpcf !== undefined) | ||||
Engine.SetDisableShadowPCF(output.disable_shadowpcf); | Engine.ConfigDB_CreateValue("hwdetect", "shadowpcf", !output.disable_shadowpcf); | ||||
if (output.disable_allwater !== undefined) | if (output.disable_allwater !== undefined) | ||||
Engine.SetDisableAllWater(output.disable_allwater); | { | ||||
Engine.ConfigDB_CreateValue("hwdetect", "watereffects", !output.disable_allwater); | |||||
Engine.ConfigDB_CreateValue("hwdetect", "waterfancyeffects", !output.disable_allwater); | |||||
Engine.ConfigDB_CreateValue("hwdetect", "waterrealdepth", !output.disable_allwater); | |||||
Engine.ConfigDB_CreateValue("hwdetect", "watershadows", !output.disable_allwater); | |||||
Engine.ConfigDB_CreateValue("hwdetect", "waterrefraction", !output.disable_allwater); | |||||
Engine.ConfigDB_CreateValue("hwdetect", "waterreflection", !output.disable_allwater); | |||||
} | |||||
if (output.disable_fancywater !== undefined) | if (output.disable_fancywater !== undefined) | ||||
Engine.SetDisableFancyWater(output.disable_fancywater); | { | ||||
Engine.ConfigDB_CreateValue("hwdetect", "waterfancyeffects", !output.disable_fancywater); | |||||
Engine.ConfigDB_CreateValue("hwdetect", "waterrealdepth", !output.disable_fancywater); | |||||
Engine.ConfigDB_CreateValue("hwdetect", "watershadows", !output.disable_fancywater); | |||||
} | |||||
if (output.enable_glsl !== undefined) | if (output.enable_glsl !== undefined) | ||||
Engine.SetEnableGLSL(output.enable_glsl); | Engine.ConfigDB_CreateValue("hwdetect", "preferglsl", output.enable_glsl); | ||||
if (output.enable_postproc !== undefined) | if (output.enable_postproc !== undefined) | ||||
Engine.SetEnablePostProc(output.enable_postproc); | Engine.ConfigDB_CreateValue("hwdetect", "postproc", output.enable_postproc); | ||||
if (output.enable_smoothlos !== undefined) | if (output.enable_smoothlos !== undefined) | ||||
Engine.SetEnableSmoothLOS(output.enable_smoothlos); | Engine.ConfigDB_CreateValue("hwdetect", "smoothlos", output.enable_smoothlos); | ||||
if (output.override_renderpath !== undefined) | if (output.override_renderpath !== undefined) | ||||
Engine.SetRenderPath(output.override_renderpath); | Engine.ConfigDB_CreateValue("hwdetect", "renderpath", output.override_renderpath); | ||||
}; | }; |
Wildfire Games · Phabricator
Should be removed if you nuke the option, shouldn't it.