summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-07-07 15:01:02 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-07-07 15:13:53 -0400
commit5a2bd580cdd3d83daef3e5c0da1cf0b0236f1d05 (patch)
treee6c662ba9ccb07e8c9337e2b7fadb8961af3bf2d
parent1528b44349d33495c7ea5dc7b3fcd8e07995d16e (diff)
downloadrockbox-5a2bd580cd.tar.gz
rockbox-5a2bd580cd.zip
Hopefully fix the last of the stragglers.
* xDuoo X3 fix some warnings due to an incorrect #ifdef * stub storage_removeable() and storage_present() for non-HOTSWAP builds * sim_trigger_external() is gated by HOTSWAP, not MULTIDRIVE Change-Id: I38f14fdfeba13957899c378051d49afc2e8245e5
-rw-r--r--firmware/export/storage.h3
-rw-r--r--firmware/target/hosted/sdl/button-sdl.c2
-rw-r--r--firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c6
-rw-r--r--uisimulator/common/sim_tasks.c2
-rw-r--r--uisimulator/common/sim_tasks.h2
5 files changed, 10 insertions, 5 deletions
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index ee1423c93a..b87b7d001f 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -310,6 +310,9 @@ void storage_get_info(int drive, struct storage_info *info);
#ifdef HAVE_HOTSWAP
bool storage_removable(int drive);
bool storage_present(int drive);
+#else
+#define storage_removable(x) 0
+#define storage_present(x) 1
#endif
int storage_driver_type(int drive);
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c
index 1055d7e0b9..b5f3720a3b 100644
--- a/firmware/target/hosted/sdl/button-sdl.c
+++ b/firmware/target/hosted/sdl/button-sdl.c
@@ -340,7 +340,7 @@ static void button_event(int key, bool pressed)
}
return;
#endif
-#ifdef HAVE_MULTIDRIVE
+#ifdef HAVE_HOTSWAP
case EXT_KEY:
if (!pressed)
sim_trigger_external(!storage_present(1));
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c
index 1c9fe4300b..914cd6d9d3 100644
--- a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c
+++ b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c
@@ -565,7 +565,7 @@ static inline int write_sector(unsigned long start, unsigned int count,
int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf)
{
-#ifdef HAVE_MULTIVOLUME
+#ifdef HAVE_MULTIDRIVE
(void)drive;
#endif
int ret = 0;
@@ -592,7 +592,7 @@ int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* bu
int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf)
{
-#ifdef HAVE_MULTIVOLUME
+#ifdef HAVE_MULTIDRIVE
(void)drive;
#endif
int ret = 0;
@@ -664,7 +664,7 @@ void nand_sleepnow(void)
#ifdef STORAGE_GET_INFO
void nand_get_info(IF_MD(int drive,) struct storage_info *info)
{
-#ifdef HAVE_MULTIVOLUME
+#ifdef HAVE_MULTIDRIVE
(void)drive;
#endif
diff --git a/uisimulator/common/sim_tasks.c b/uisimulator/common/sim_tasks.c
index 839ad828b8..6662b28767 100644
--- a/uisimulator/common/sim_tasks.c
+++ b/uisimulator/common/sim_tasks.c
@@ -222,7 +222,7 @@ void usb_wait_for_disconnect(struct event_queue *q)
static bool is_ext_inserted;
-#ifdef HAVE_MULTIDRIVE
+#ifdef HAVE_HOTSWAP
void sim_trigger_external(bool inserted)
{
is_ext_inserted = inserted;
diff --git a/uisimulator/common/sim_tasks.h b/uisimulator/common/sim_tasks.h
index 689a4a8566..cfe3e71c3a 100644
--- a/uisimulator/common/sim_tasks.h
+++ b/uisimulator/common/sim_tasks.h
@@ -28,7 +28,9 @@
void sim_tasks_init(void);
void sim_trigger_screendump(void);
void sim_trigger_usb(bool inserted);
+#ifdef HAVE_HOTSWAP
void sim_trigger_external(bool inserted);
+#endif
void sim_trigger_hp(bool inserted);
void sim_trigger_lo(bool inserted);
#endif