| 28 | MODULE_WITH_PAUSE("SCREEN"); |
| 29 | |
| 30 | static void init(void) { |
| 31 | M_SUB(AMBIENT_BR_UPD); |
| 32 | M_SUB(SCR_TO_REQ); |
| 33 | M_SUB(UPOWER_UPD); |
| 34 | M_SUB(DISPLAY_UPD); |
| 35 | M_SUB(SENS_UPD); |
| 36 | M_SUB(LID_UPD); |
| 37 | M_SUB(SUSPEND_UPD); |
| 38 | M_SUB(NO_AUTOCALIB_UPD); |
| 39 | M_SUB(INHIBIT_UPD); |
| 40 | M_SUB(CONTRIB_REQ); |
| 41 | |
| 42 | if (get_screen_brightness(false) != 0) { |
| 43 | // We are on an unsupported wayland compositor; kill ourself immediately without further message processing |
| 44 | WARN("Failed to init. Killing module.\n"); |
| 45 | module_deregister((self_t **)&self()); |
| 46 | } else { |
| 47 | m_become(waiting_state); |
| 48 | init_Screen_api(); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | static bool check(void) { |
| 53 | return true; |
nothing calls this directly
no test coverage detected