diff --git a/core/os/os.h b/core/os/os.h index 4ad91a77ea0..140449c8984 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -365,9 +365,11 @@ public: // This is invoked by the GDExtensionManager after loading GDExtensions specified by the project. virtual void load_platform_gdextensions() const {} +#ifdef TOOLS_ENABLED // Tests OpenGL context and Rendering Device simultaneous creation. This function is expected to crash on some NVIDIA drivers. virtual bool _test_create_rendering_device_and_gl(const String &p_display_driver) const { return true; } virtual bool _test_create_rendering_device(const String &p_display_driver) const { return true; } +#endif OS(); virtual ~OS(); diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp index 8b02d089e22..91958cb7633 100644 --- a/platform/linuxbsd/os_linuxbsd.cpp +++ b/platform/linuxbsd/os_linuxbsd.cpp @@ -1197,6 +1197,7 @@ String OS_LinuxBSD::get_system_ca_certificates() { return f->get_as_text(); } +#ifdef TOOLS_ENABLED bool OS_LinuxBSD::_test_create_rendering_device(const String &p_display_driver) const { // Tests Rendering Device creation. @@ -1263,6 +1264,7 @@ bool OS_LinuxBSD::_test_create_rendering_device_and_gl(const String &p_display_d #endif return _test_create_rendering_device(p_display_driver); } +#endif OS_LinuxBSD::OS_LinuxBSD() { main_loop = nullptr; diff --git a/platform/linuxbsd/os_linuxbsd.h b/platform/linuxbsd/os_linuxbsd.h index 736b03232b0..50bc0910283 100644 --- a/platform/linuxbsd/os_linuxbsd.h +++ b/platform/linuxbsd/os_linuxbsd.h @@ -137,8 +137,10 @@ public: virtual String get_system_ca_certificates() override; +#ifdef TOOLS_ENABLED virtual bool _test_create_rendering_device_and_gl(const String &p_display_driver) const override; virtual bool _test_create_rendering_device(const String &p_display_driver) const override; +#endif OS_LinuxBSD(); ~OS_LinuxBSD(); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 70c61e1d249..10958317091 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2570,6 +2570,7 @@ void OS_Windows::add_frame_delay(bool p_can_draw) { } } +#ifdef TOOLS_ENABLED bool OS_Windows::_test_create_rendering_device(const String &p_display_driver) const { // Tests Rendering Device creation. @@ -2662,6 +2663,7 @@ bool OS_Windows::_test_create_rendering_device_and_gl(const String &p_display_dr UnregisterClassW(L"Engine probe window", GetModuleHandle(nullptr)); return ok; } +#endif OS_Windows::OS_Windows(HINSTANCE _hInstance) { hInstance = _hInstance; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index bc820facd56..1f762c06296 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -257,8 +257,10 @@ public: void set_main_window(HWND p_main_window) { main_window = p_main_window; } +#ifdef TOOLS_ENABLED virtual bool _test_create_rendering_device_and_gl(const String &p_display_driver) const override; virtual bool _test_create_rendering_device(const String &p_display_driver) const override; +#endif HINSTANCE get_hinstance() { return hInstance; } OS_Windows(HINSTANCE _hInstance);