This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository enlightenment.
View the commit online.
commit 5462512d5eaf4dd3d8aaa208239ced3253467ef3
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Wed Dec 4 10:23:48 2024 +0000
cpufreq - handle initial powersve mode on module load
we handle the changes with events but not initial mode
---
src/modules/cpufreq/e_mod_main.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index f3a2c9925..6d513c3fb 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -392,12 +392,10 @@ _button_cb_mouse_down(void *data, Evas *e EINA_UNUSED,
}
}
-static Eina_Bool
-_cpufreq_event_cb_powersave(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+static void
+_handle_powersave_mode(E_Powersave_Mode mode)
{
- E_Event_Powersave_Update *ev = event;
-
- switch (ev->mode)
+ switch (mode)
{
case E_POWERSAVE_MODE_NONE:
printf("PWSV: none\n");
@@ -426,7 +424,14 @@ _cpufreq_event_cb_powersave(void *data EINA_UNUSED, int type EINA_UNUSED, void *
default:
break;
}
+}
+static Eina_Bool
+_cpufreq_event_cb_powersave(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ E_Event_Powersave_Update *ev = event;
+
+ _handle_powersave_mode(ev->mode);
return ECORE_CALLBACK_PASS_ON;
}
@@ -477,6 +482,8 @@ e_modapi_init(E_Module *m)
NULL, "preferences-cpu-speed",
e_int_config_cpufreq_module);
cpf_poll_time_set(cpufreq_config->check_interval);
+
+ _handle_powersave_mode(e_powersave_mode_get());
return m;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.