From 5d1e026f7df2ab61be6321eaf3ab1ca6061f1ae6 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 8 Sep 2021 13:49:04 +0600 Subject: [PATCH] Add help command This commit also adds PrintScreen key mapping. --- src/unix/unix.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/unix/unix.c b/src/unix/unix.c index d8df7f655..ec71dee84 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -158,7 +158,8 @@ static const uint16_t sdl_to_xt[0x200] = [SDL_SCANCODE_LGUI] = 0x15B, [SDL_SCANCODE_RGUI] = 0x15C, - [SDL_SCANCODE_APPLICATION] = 0x15D + [SDL_SCANCODE_APPLICATION] = 0x15D, + [SDL_SCANCODE_PRINTSCREEN] = 0x137 }; typedef struct sdl_blit_params @@ -759,8 +760,26 @@ void monitor_thread(void* param) xargv[cmdargc++] = local_strsep(&linecpy, " "); if (xargv[cmdargc - 1] == NULL || cmdargc >= 512) break; } - cmdargc--; - if (strncasecmp(xargv[0], "exit", 4) == 0) + cmdargc--; + if (strncasecmp(xargv[0], "help", 4) == 0) + { + printf( + "fddload - Load floppy disk image into drive .\n" + "cdload - Load CD-ROM image into drive .\n" + "zipload - Load ZIP image into ZIP drive .\n" + "cartload - Load cartridge image into cartridge drive .\n" + "moload - Load MO image into MO drive .\n\n" + "fddeject - eject disk from floppy drive .\n" + "cdeject - eject disc from CD-ROM drive .\n" + "zipeject - eject ZIP image from ZIP drive .\n" + "carteject - eject cartridge from drive .\n" + "moeject - eject image from MO drive .\n\n" + "hardreset - hard reset the emulated system.\n" + "pause - pause the the emulated system.\n" + "fullscreen - toggle fullscreen.\n" + "exit - exit 86Box.\n"); + } + else if (strncasecmp(xargv[0], "exit", 4) == 0) { exit_event = 1; }