Minimig: fix behaviour of disk led, add led activity to shared folder access.

This commit is contained in:
sorgelig
2021-07-31 06:57:18 +08:00
parent 97ad1c07e7
commit aebed6b479
5 changed files with 18 additions and 5 deletions

View File

@@ -1050,6 +1050,12 @@ int toggle_kbdled(int mask)
return state;
}
static int sysled_is_enabled = 1;
void sysled_enable(int en)
{
sysled_is_enabled = en;
}
#define JOYMAP_DIR "inputs/"
static int load_map(const char *name, void *pBuffer, int size)
{
@@ -4047,7 +4053,10 @@ int input_test(int getchar)
if ((pool[NUMDEV + 2].fd >= 0) && (pool[NUMDEV + 2].revents & POLLPRI))
{
static char status[16];
if (read(pool[NUMDEV + 2].fd, status, sizeof(status) - 1) && status[0] != '0') DISKLED_ON;
if (read(pool[NUMDEV + 2].fd, status, sizeof(status) - 1) && status[0] != '0')
{
if (sysled_is_enabled || video_fb_state()) DISKLED_ON;
}
lseek(pool[NUMDEV + 2].fd, 0, SEEK_SET);
}
}