forked from 0ad/0ad
leper
be2f0e69fc
Mount public in case we are starting Atlas and no mods are specified in the config. If users remove all mods and save this to the config and try to start Atlas it will crash, as it cannot find some needed files. This was SVN commit r15678.
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
// Run in a standalone JS shell like
|
|
// js -e 'var global={}' -f hwdetect.js -f test_data.js -f test.js > output.html
|
|
// where test_data.js is a giant file that's probably not publicly available yet
|
|
// (ask Philip if you want a copy), then look at output.html and make sure it's
|
|
// applying the hwdetected settings in the appropriate cases
|
|
|
|
print("<!DOCTYPE html>");
|
|
print("<meta charset=utf-8>");
|
|
print("<style>body { font: 8pt sans-serif; }</style>");
|
|
print("<table>");
|
|
print("<tr>");
|
|
print("<th>OS");
|
|
print("<th>GL_RENDERER");
|
|
print("<th>Output");
|
|
print("<th>Warnings");
|
|
|
|
hwdetectTestData.sort(function(a, b) {
|
|
if (a.GL_RENDERER < b.GL_RENDERER)
|
|
return -1;
|
|
if (b.GL_RENDERER < a.GL_RENDERER)
|
|
return +1;
|
|
return 0;
|
|
});
|
|
|
|
for each (var settings in hwdetectTestData)
|
|
{
|
|
var output = RunDetection(settings);
|
|
|
|
var os = (settings.os_linux ? "linux" : settings.os_macosx ? "macosx" : settings.os_win ? "win" : "???");
|
|
|
|
var disabled = [];
|
|
for each (var d in ["disable_audio", "disable_s3tc", "disable_shadows", "disable_shadowpcf", "disable_allwater", "disable_fancywater", "override_renderpath"])
|
|
if (output[d] !== undefined)
|
|
disabled.push(d+"="+output[d])
|
|
|
|
print("<tr>");
|
|
print("<td>" + os);
|
|
print("<td>" + settings.GL_RENDERER);
|
|
print("<td>" + disabled.join(" "));
|
|
print("<td>" + output.warnings.concat(output.dialog_warnings).join("\n"));
|
|
}
|
|
|
|
print("</table>");
|