mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-25 07:10:43 -04:00
Pmem reset (#1115)
* reset config when holding down select durring boot it still need to be tripple checked if adc or control init really doesnt use any pmem * one less magic number :) * dual key action left+right for pmem reset --------- Co-authored-by: Eisenberger Tamas <e.tamas@iwstudio.hu>
This commit is contained in:
parent
d3a7414e51
commit
3ddc753c88
2 changed files with 24 additions and 18 deletions
|
@ -39,6 +39,8 @@
|
|||
#include <fstream>
|
||||
#include "file.hpp"
|
||||
|
||||
#include "irq_controls.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace portapack {
|
||||
|
@ -445,7 +447,8 @@ void defaults() {
|
|||
}
|
||||
|
||||
void init() {
|
||||
if (backup_ram->is_valid()) {
|
||||
const auto switches_state = get_switches_state();
|
||||
if (!(switches_state[(size_t)ui::KeyEvent::Left] && switches_state[(size_t)ui::KeyEvent::Right]) && backup_ram->is_valid()) {
|
||||
// Copy valid persistent data into cache.
|
||||
cached_backup_ram = *backup_ram;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue