diff options
author | Nebuleon Fumika | 2013-03-28 04:00:17 -0400 |
---|---|---|
committer | Nebuleon Fumika | 2013-03-28 04:00:17 -0400 |
commit | 8d1854d8a25b4966736c88e4f692e0591650eaf6 (patch) | |
tree | 54b2c8f02cadc06a3252278597f87c1586738e5f | |
parent | 13449ee395e10ed6f6e8ff7c1cc9873d249fb2fb (diff) | |
download | snes9x2005-8d1854d8a25b4966736c88e4f692e0591650eaf6.tar.gz snes9x2005-8d1854d8a25b4966736c88e4f692e0591650eaf6.tar.bz2 snes9x2005-8d1854d8a25b4966736c88e4f692e0591650eaf6.zip |
Make "Save a screenshot" work with touch.
-rw-r--r-- | source/nds/gui.c | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c index db522a1..eeaad95 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -2740,41 +2740,37 @@ u32 menu(u16 *screen, bool8 FirstInvocation) void save_screen_snapshot() { - if(gui_action == CURSOR_SELECT) + if(bg_screenp != NULL) { - if(bg_screenp != NULL) - { - bg_screenp_color = COLOR16(43, 11, 11); - memcpy(bg_screenp, down_screen_addr, 256*192*2); - } - else - bg_screenp_color = COLOR_BG; + bg_screenp_color = COLOR16(43, 11, 11); + memcpy(bg_screenp, down_screen_addr, 256*192*2); + } + else + bg_screenp_color = COLOR_BG; - draw_message(down_screen_addr, bg_screenp, 28, 31, 227, 165, bg_screenp_color); - if(!first_load) - { - draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_PROGRESS_SCREENSHOT_CREATING]); - ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); - if(save_ss_bmp(screen)) - draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_PROGRESS_SCREENSHOT_CREATION_SUCCEEDED]); - else - draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_PROGRESS_SCREENSHOT_CREATION_FAILED]); - ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); - mdelay(500); - } + draw_message(down_screen_addr, bg_screenp, 28, 31, 227, 165, bg_screenp_color); + if(!first_load) + { + draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_PROGRESS_SCREENSHOT_CREATING]); + ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); + if(save_ss_bmp(screen)) + draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_PROGRESS_SCREENSHOT_CREATION_SUCCEEDED]); else - { - draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_TOP_SCREEN_NO_SAVED_STATE_IN_SLOT]); - ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); - mdelay(500); - } + draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_PROGRESS_SCREENSHOT_CREATION_FAILED]); + ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); + mdelay(500); + } + else + { + draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_TOP_SCREEN_NO_SAVED_STATE_IN_SLOT]); + ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); + mdelay(500); } } void browse_screen_snapshot() { - if(current_option_num == 2) - play_screen_snapshot(); + play_screen_snapshot(); } void time_backward_action() |