mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-27 00:35:59 -04:00
fake brightness adjust (#1845)
* temp * temp - 1 * next step note * fix circuit dependency (to fix:can't read p.mem) * fix circuit dependency (to fix:can't read p.mem) * notes * bitmap * bitmap * remove my stupid forward declearation * clean up * clean up * level control * clean up * clean up * clean up * clean up * format * format * format * format * format * fix for comment advices * fix for comment advices * fix display issue in notepad app * slightly increase performance... * temp for grey_scale and high_constrast * format * note for cache implement * fix for comment request * fix for comment request
This commit is contained in:
parent
5eef5b4e31
commit
0370b4eb55
15 changed files with 303 additions and 19 deletions
|
@ -327,6 +327,26 @@ SystemStatusView::SystemStatusView(
|
|||
refresh();
|
||||
};
|
||||
|
||||
toggle_fake_brightness.on_change = [this, &nav](bool v) {
|
||||
set_dirty();
|
||||
pmem::set_apply_fake_brightness(v);
|
||||
if (nav.is_valid() && v) {
|
||||
nav.display_modal(
|
||||
"Brightness",
|
||||
"You have enabled brightness\n"
|
||||
"adjustment. Performance\n"
|
||||
"will be impacted slightly.");
|
||||
|
||||
// TODO: refresh interface to prevent reboot requirement
|
||||
// TODO: increase performance
|
||||
} else if (!v) {
|
||||
nav.display_modal(
|
||||
"Brightness",
|
||||
"Brightness adjust disabled.");
|
||||
}
|
||||
refresh();
|
||||
};
|
||||
|
||||
button_bias_tee.on_select = [this](ImageButton&) {
|
||||
this->on_bias_tee();
|
||||
};
|
||||
|
@ -348,6 +368,7 @@ SystemStatusView::SystemStatusView(
|
|||
toggle_speaker.set_value(pmem::config_speaker_disable());
|
||||
toggle_mute.set_value(pmem::config_audio_mute());
|
||||
toggle_stealth.set_value(pmem::stealth_mode());
|
||||
toggle_fake_brightness.set_value(pmem::apply_fake_brightness());
|
||||
|
||||
audio::output::stop();
|
||||
audio::output::update_audio_mute();
|
||||
|
@ -369,6 +390,8 @@ void SystemStatusView::refresh() {
|
|||
// Display "Disable speaker" icon only if AK4951 Codec which has separate speaker/headphone control
|
||||
if (audio::speaker_disable_supported() && !pmem::ui_hide_speaker()) status_icons.add(&toggle_speaker);
|
||||
|
||||
if (!pmem::ui_hide_fake_brightness()) status_icons.add(&toggle_fake_brightness);
|
||||
|
||||
if (!pmem::ui_hide_sd_card()) status_icons.add(&sd_card_status_view);
|
||||
status_icons.update_layout();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue