mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
debug_menu: show 2nd SD/MMC card info only if NUM_DRIVES > 1
Toggling to the second card was allowed if HAVE_HOTSWAP was defined, but on targets with a single hotswappable SD card -- for example many JZ47xx/X1000 targets -- this ends up calling card_get_info() on a non-existent drive. A slightly better option is to check if NUM_DRIVES is greater than 1. This is still just guessing the number of SD/MMC slots, but it should be wrong in fewer cases. Change-Id: Ifca29323f1c7091d9cce55c73147d0d1decae9a5
This commit is contained in:
parent
c9c6fde6eb
commit
eafcbd3fd6
1 changed files with 1 additions and 1 deletions
|
|
@ -1283,7 +1283,7 @@ static int disk_callback(int btn, struct gui_synclist *lists)
|
|||
|
||||
if ((btn == ACTION_STD_OK) || (btn == SYS_FS_CHANGED) || (btn == ACTION_REDRAW))
|
||||
{
|
||||
#ifdef HAVE_HOTSWAP
|
||||
#if NUM_DRIVES > 1
|
||||
if (btn == ACTION_STD_OK)
|
||||
{
|
||||
*cardnum ^= 0x1; /* change cards */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue