mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-26 03:06:42 +00:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user