Android: Detect and report power save mode.

This shows a message when it's on, or when power drops to low.
This commit is contained in:
Unknown W. Brackets committed 2016-07-24 17:04:06 -07:00
1 parent eb72a746b9
commit 1f7a137926
7 files changed
+89 -1

No files matched your search

+8
View File
@@ -784,6 +784,14 @@ void HandleGlobalMessage(const std::string &msg, const std::string &value) {
// Show for the same duration as the preview.
osm.Show(msg, 2.0f, 0xFFFFFF, -1, true, "savestate_slot");
}
if (msg == "core_powerSaving") {
if (value != "false") {
I18NCategory *sy = GetI18NCategory("System");
osm.Show(sy->T("WARNING: Battery save mode is on"), 2.0f, 0xFFFFFF, -1, true, "core_powerSaving");
}
Core_SetPowerSaving(value != "false");
}
}
void NativeUpdate(InputState &input) {