Skip to content

Commit 62a7b2a

Browse files
Merge pull request #12 from kbembedded/fix-furi-crash
Fix furi crash
2 parents 04e0332 + dc12f70 commit 62a7b2a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pokemon_app.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,12 @@ extern "C" int32_t pokemon_app(void* p) {
124124
furi_hal_light_set(LightRed, 0x00);
125125
furi_hal_light_set(LightGreen, 0x00);
126126
furi_hal_light_set(LightBlue, 0x00);
127-
view_dispatcher_enable_queue(app->view_dispatcher);
128-
view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
129127
//switch view and run dispatcher
130-
view_dispatcher_switch_to_view(app->view_dispatcher, AppViewSelectPokemon);
131128
view_dispatcher_run(app->view_dispatcher);
132129

133130
// Free resources
134131
free_app(app);
135132
furi_record_close(RECORD_GUI);
136133

137134
return 0;
138-
}
135+
}

views/trade.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ void trade_enter_callback(void* context) {
327327
GpioModeInterruptRise,
328328
GpioPullNo,
329329
GpioSpeedVeryHigh); // <-- This line causes the "OK" to stop functioning when exiting the application, so a reboot of the Flipper Zero is required.
330+
furi_hal_gpio_remove_int_callback(&GAME_BOY_CLK);
330331
furi_hal_gpio_add_int_callback(&GAME_BOY_CLK, input_clk_gameboy, trade);
331332

332333
// furi_hal_gpio_disable_int_callback(&GAME_BOY_CLK);
@@ -384,4 +385,4 @@ void trade_free(App* app) {
384385
View* trade_get_view(App* app) {
385386
furi_assert(app);
386387
return app->trade->view;
387-
}
388+
}

0 commit comments

Comments
 (0)