Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/hw_miyoo.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@
static int selected_mixer = -1;
static int display_on_value = 100;

void hw_display_off(void)
static void set_display_state(const char *state) { //added because the image continues to be generated even with the screen off
FILE *f;
if ((f = fopen("/proc/mi_modules/fb/mi_fb0", "w"))) {
fprintf(f, "GUI_SHOW %s\n", state);
fclose(f);
}
}

void hw_display_off(void)
{
char tmp[5];
FILE *f;
Expand All @@ -37,6 +45,7 @@ void hw_display_off(void)
fclose(f);
}
}
set_display_state("off");
}

void hw_display_on(void)
Expand All @@ -50,6 +59,7 @@ void hw_display_on(void)
fclose(f);
}
}
set_display_state("on");
}

int hw_open_mixer(int mixer_channel)
Expand Down