Change screenshot in full screen
@@ -46,8 +46,8 @@ BlitGameMetadata selected_game_metadata;
SpriteSheet *spritesheet;
Surface *screenshot;
-AutoRepeat ar_button_up;
-AutoRepeat ar_button_down;
+AutoRepeat ar_button_up(250, 600);
+AutoRepeat ar_button_down(250, 600);
AutoRepeat ar_button_left(0, 0);
AutoRepeat ar_button_right(0, 0);
@@ -494,14 +494,6 @@ void update(uint32_t time) {
return;
}
- if (currentScreen == Screen::screenshot) {
- if(button_b) {
- currentScreen = Screen::main;
- }
-
- return;
- }
-
if (button_menu) {
credits::reset_scrolling();
currentScreen = Screen::credits;
@@ -530,6 +522,12 @@ void update(uint32_t time) {
}
}
+ if(currentScreen == Screen::screenshot) {
+ // b to exit full screen screenshot view
+ if(button_b) {
+ currentScreen = Screen::main;
+ }
+ } else {
// switch between flash and SD lists
if(button_left) {
if(current_directory == directory_list.begin())
@@ -552,6 +550,12 @@ void update(uint32_t time) {
load_current_game_metadata();
}
+ if (button_y) {
+ file_sort = file_sort == SortBy::name ? SortBy::size : SortBy::name;
+ sort_file_list();
+ }
+ }
+
// scroll list towards selected item
file_list_scroll_offset.y += ((selected_menu_item * ROW_HEIGHT) - file_list_scroll_offset.y) / 5.0f;
@@ -562,17 +566,18 @@ void update(uint32_t time) {
load_current_game_metadata();
}
- // delete current game
- if (button_x && !game_list.empty()) {
- delete_current_game();
+ // paranoid bail out if you're browsing screenshots full screen and come across a game
+ if(selected_game.type != GameType::screenshot && currentScreen == Screen::screenshot) {
+ currentScreen = Screen::main;
}
- if (button_y) {
- file_sort = file_sort == SortBy::name ? SortBy::size : SortBy::name;
- sort_file_list();
+ // delete current game / screenshot
+ if (button_x && !game_list.empty()) {
+ delete_current_game();
}
- if(button_a && !game_list.empty())
+ if(!game_list.empty()) {
+ if(button_a)
{
if(selected_game.type == GameType::screenshot) {
currentScreen = Screen::screenshot;
@@ -582,3 +587,4 @@ void update(uint32_t time) {
}
}
}
+}
