Skip to content

Commit aefaf67

Browse files
authored
Merge pull request #31 from ashleyhuxley/fen/remove-back-button-action
fix: removed handler for back button as it just goes to a blank scree…
2 parents 02ca116 + 07c0604 commit aefaf67

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

bomber_loop.c

+1-14
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010
#define MAX_X 16
1111
#define MAX_Y 8
1212

13-
// End the game but don't quit the app
14-
// TODO: Figure out whether this actually needs to be here. What should happen when the player presses Back during gameplay?
15-
static void bomber_app_stop_playing(BomberAppState* state) {
16-
FURI_LOG_I(TAG, "Stop playing");
17-
bomber_app_set_mode(state, BomberAppMode_Finished);
18-
}
19-
2013
// Quit the app
2114
static void bomber_app_quit(BomberAppState* state) {
2215
FURI_LOG_I(TAG, "Quitting");
@@ -245,12 +238,6 @@ static bool handle_game_input(BomberAppState* state, InputEvent input) {
245238
case InputKeyLeft:
246239
case InputKeyRight:
247240
return handle_game_direction(state, input);
248-
case InputKeyBack:
249-
if(state->mode == BomberAppMode_Playing) {
250-
bomber_app_stop_playing(state);
251-
return true;
252-
}
253-
break;
254241
default:
255242
break;
256243
}
@@ -264,7 +251,7 @@ static bool handle_game_input(BomberAppState* state, InputEvent input) {
264251
// input: Represents the input event
265252
// returns: true if the viewport should be updated, else false
266253
static bool bomber_app_handle_input(BomberAppState* state, InputEvent input) {
267-
if(input.type == InputTypeLong && input.key == InputKeyBack) {
254+
if(input.key == InputKeyBack) {
268255
bomber_app_quit(state);
269256
return false; // don't try to update the UI while quitting
270257
}

0 commit comments

Comments
 (0)