mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Cleaner BadKB pin sync
This commit is contained in:
@@ -219,11 +219,14 @@ void bad_kb_set_layout(BadKb* bad_kb, const char* layout) {
|
||||
|
||||
void bad_kb_set_state(BadKb* bad_kb, BadKbState* st) {
|
||||
furi_assert(st);
|
||||
if(bad_kb->context != NULL && ((BadKbApp*)bad_kb->context)->bt != NULL) {
|
||||
st->pin = ((BadKbApp*)bad_kb->context)->bt->pin;
|
||||
} else {
|
||||
st->pin = 0;
|
||||
uint32_t pin = 0;
|
||||
if(bad_kb->context != NULL) {
|
||||
BadKbApp* app = bad_kb->context;
|
||||
if(app->bt != NULL) {
|
||||
pin = app->bt->pin;
|
||||
}
|
||||
}
|
||||
st->pin = pin;
|
||||
with_view_model(
|
||||
bad_kb->view,
|
||||
BadKbModel * model,
|
||||
|
||||
Reference in New Issue
Block a user