Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/GameSetup/HWDetect.cpp
Show All 39 Lines | |||||
#include "ps/GameSetup/Config.h" | #include "ps/GameSetup/Config.h" | ||||
#include "ps/Profile.h" | #include "ps/Profile.h" | ||||
#include "ps/scripting/JSInterface_ConfigDB.h" | #include "ps/scripting/JSInterface_ConfigDB.h" | ||||
#include "ps/scripting/JSInterface_Debug.h" | #include "ps/scripting/JSInterface_Debug.h" | ||||
#include "ps/UserReport.h" | #include "ps/UserReport.h" | ||||
#include "ps/VideoMode.h" | #include "ps/VideoMode.h" | ||||
#include "scriptinterface/FunctionWrapper.h" | #include "scriptinterface/FunctionWrapper.h" | ||||
#include "scriptinterface/Object.h" | #include "scriptinterface/Object.h" | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/JSON.h" | ||||
#if OS_LINUX | #if OS_LINUX | ||||
#include <fstream> | #include <fstream> | ||||
#endif | #endif | ||||
// TODO: Support OpenGL platforms which don't use GLX as well. | // TODO: Support OpenGL platforms which don't use GLX as well. | ||||
#if defined(SDL_VIDEO_DRIVER_X11) && !CONFIG2_GLES | #if defined(SDL_VIDEO_DRIVER_X11) && !CONFIG2_GLES | ||||
#include <GL/glx.h> | #include <GL/glx.h> | ||||
▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | #endif | ||||
// The version should be increased for every meaningful change. | // The version should be increased for every meaningful change. | ||||
const int reportVersion = 14; | const int reportVersion = 14; | ||||
// Send the same data to the reporting system | // Send the same data to the reporting system | ||||
g_UserReporter.SubmitReport( | g_UserReporter.SubmitReport( | ||||
"hwdetect", | "hwdetect", | ||||
reportVersion, | reportVersion, | ||||
scriptInterface.StringifyJSON(&settings, false), | Script::StringifyJSON(rq, &settings, false), | ||||
scriptInterface.StringifyJSON(&settings, true)); | Script::StringifyJSON(rq, &settings, true)); | ||||
// Run the detection script: | // Run the detection script: | ||||
JS::RootedValue global(rq.cx, rq.globalValue()); | JS::RootedValue global(rq.cx, rq.globalValue()); | ||||
ScriptFunction::CallVoid(rq, global, "RunHardwareDetection", settings); | ScriptFunction::CallVoid(rq, global, "RunHardwareDetection", settings); | ||||
} | } | ||||
static void ReportSDL(const ScriptRequest& rq, JS::HandleValue settings) | static void ReportSDL(const ScriptRequest& rq, JS::HandleValue settings) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 427 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator