Add script-based system for doing messy stuff based on system configuration.

Display warning for certain broken NVIDIA drivers.

This was SVN commit r8663.
This commit is contained in:
Ykkrosh
2010-11-20 19:46:49 +00:00
parent 2925ab4ce4
commit c36fc2b8d7
8 changed files with 265 additions and 6 deletions
+7
View File
@@ -328,6 +328,12 @@ bool HotkeyIsPressed_(void* UNUSED(cbdata), std::string hotkeyName)
return HotkeyIsPressed(hotkeyName);
}
void DisplayErrorDialog(void* UNUSED(cbdata), std::wstring msg)
{
debug_DisplayError(msg.c_str(), DE_NO_DEBUG_INFO, NULL, NULL, NULL, 0, NULL, NULL);
}
void SetSimRate(void* UNUSED(cbdata), float rate)
{
g_Game->SetSimRate(rate);
@@ -415,6 +421,7 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollow>("CameraFollow");
scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollowFPS>("CameraFollowFPS");
scriptInterface.RegisterFunction<bool, std::string, &HotkeyIsPressed_>("HotkeyIsPressed");
scriptInterface.RegisterFunction<void, std::wstring, &DisplayErrorDialog>("DisplayErrorDialog");
// Development/debugging functions
scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate");