Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/GameSetup/HWDetect.cpp
Show First 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | static void ReportSDL(const ScriptInterface& scriptInterface, JS::HandleValue settings) | ||||
char version[16]; | char version[16]; | ||||
snprintf(version, ARRAY_SIZE(version), "%d.%d.%d", build.major, build.minor, build.patch); | snprintf(version, ARRAY_SIZE(version), "%d.%d.%d", build.major, build.minor, build.patch); | ||||
scriptInterface.SetProperty(settings, "sdl_build_version", version); | scriptInterface.SetProperty(settings, "sdl_build_version", version); | ||||
SDL_GetVersion(&runtime); | SDL_GetVersion(&runtime); | ||||
snprintf(version, ARRAY_SIZE(version), "%d.%d.%d", runtime.major, runtime.minor, runtime.patch); | snprintf(version, ARRAY_SIZE(version), "%d.%d.%d", runtime.major, runtime.minor, runtime.patch); | ||||
scriptInterface.SetProperty(settings, "sdl_runtime_version", version); | scriptInterface.SetProperty(settings, "sdl_runtime_version", version); | ||||
const char* backend = GetSDLSubsystem(g_VideoMode.GetWindow()); | // This is null in atlas (and further the call triggers an assertion). | ||||
const char* backend = g_VideoMode.GetWindow() ? GetSDLSubsystem(g_VideoMode.GetWindow()) : "none"; | |||||
scriptInterface.SetProperty(settings, "sdl_video_backend", backend ? backend : "unknown"); | scriptInterface.SetProperty(settings, "sdl_video_backend", backend ? backend : "unknown"); | ||||
} | } | ||||
static void ReportGLLimits(const ScriptInterface& scriptInterface, JS::HandleValue settings) | static void ReportGLLimits(const ScriptInterface& scriptInterface, JS::HandleValue settings) | ||||
{ | { | ||||
const char* errstr = "(error)"; | const char* errstr = "(error)"; | ||||
#define INTEGER(id) do { \ | #define INTEGER(id) do { \ | ||||
▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator