Add MiSTer_cmd command: volume mute/unmute/0-7.

This commit is contained in:
Sorgelig
2022-10-31 23:05:20 +08:00
parent 6bda023db8
commit 631276d59d
2 changed files with 10 additions and 1 deletions

View File

@@ -25,6 +25,7 @@
#include "fpga_io.h"
#include "osd.h"
#include "video.h"
#include "audio.h"
#include "joymapping.h"
#include "support.h"
#include "profiling.h"
@@ -5164,6 +5165,12 @@ int input_test(int getchar)
{
user_io_screenshot_cmd(cmd);
}
else if (!strncmp(cmd, "volume ", 7))
{
if (!strcmp(cmd + 7, "mute")) set_volume(0x81);
else if (!strcmp(cmd + 7, "unmute")) set_volume(0x80);
else if (cmd[7] >= '0' && cmd[7] <= '7') set_volume(0x40 - 0x30 + cmd[7]);
}
}
}