diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h index 7b6b377de8..a95087f8d0 100644 --- a/src/lib/ecore/Ecore_Common.h +++ b/src/lib/ecore/Ecore_Common.h @@ -34,6 +34,22 @@ extern "C" { * ecore_shutdown(); * } * @endcode + * + * This function is affected by some environment variables: + * + * @li @c ECORE_NO_SYSTEM_MODULES=1 may be used to temporarily + * disable system modules, often useful for debug. + * + * @li @c ECORE_FPS_DEBUG=1 prints frames per second, usefult to + * detect lags and blocking calls. + * + * @li @c ECORE_MEM_STAT=1 will generate @c ecore_mem_stat.${PID} + * file with memory statistics. + * + * @li @c ECORE_ERROR_ABORT=1 will abort on errors. + * + * This function will call eina_init(), so other environment variables + * may apply. */ EAPI int ecore_init(void); @@ -2499,6 +2515,9 @@ EAPI void ecore_app_restart(void); * This may be useful to some command-line utilities, hardly will be * useful for end-user applications. * + * The environment variable ECORE_NO_SYSTEM_MODULES=1 may be used + * to temporarily disable system modules, often useful for debug. + * * @since 1.8 */ EAPI void ecore_app_no_system_modules(void); diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index 6cca015e6c..07a1304ed0 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -57,7 +57,7 @@ static FILE *_ecore_memory_statistic_file = NULL; #endif #endif -static Eina_Bool _no_system_modules = EINA_FALSE; +static Eina_Bool _no_system_modules = 0xff; static const char *_ecore_magic_string_get(Ecore_Magic m); static int _ecore_init_count = 0; @@ -308,6 +308,13 @@ ecore_init(void) } #endif + if (_no_system_modules == 0xff) + { + const char *s = getenv("ECORE_NO_SYSTEM_MODULES"); + if (s) _no_system_modules = atoi(s); + else _no_system_modules = EINA_FALSE; + } + if (!_no_system_modules) ecore_system_modules_load();