Add Engine.print_error_messages property to disable printing errors

This can be used during unit test suite runs to hide error and warning
messages.

Care should be taken when using this feature, as it can hide important
information if used wrongly.
This commit is contained in:
Hugo Locurcio 2021-05-01 23:09:48 +02:00
parent 33a0fb6e02
commit 0eb9b414c1
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
6 changed files with 32 additions and 1 deletions

View file

@ -189,6 +189,14 @@ bool Engine::is_validation_layers_enabled() const {
return use_validation_layers;
}
void Engine::set_print_error_messages(bool p_enabled) {
_print_error_enabled = p_enabled;
}
bool Engine::is_printing_error_messages() const {
return _print_error_enabled;
}
void Engine::add_singleton(const Singleton &p_singleton) {
singletons.push_back(p_singleton);
singleton_ptrs[p_singleton.name] = p_singleton.ptr;

View file

@ -98,6 +98,9 @@ public:
void set_time_scale(float p_scale);
float get_time_scale() const;
void set_print_error_messages(bool p_enabled);
bool is_printing_error_messages() const;
void set_frame_delay(uint32_t p_msec);
uint32_t get_frame_delay() const;