1
0
mirror of https://github.com/simh/simh.git synced 2026-02-05 07:55:37 +00:00

SCP: Added a SCREENSHOT command to record the video display window.

This commit is contained in:
Mark Pizzolato
2015-09-17 11:49:01 -07:00
parent 1d6c14be3d
commit 78399f10cb
4 changed files with 97 additions and 11 deletions

19
scp.c
View File

@@ -1660,6 +1660,13 @@ ASSERT failure have several different actions:
#define HLP_EXIT "*Commands Exiting_The_Simulator"
"2Exiting The Simulator\n"
" EXIT (synonyms QUIT and BYE) returns control to the operating system.\n"
/***************** 80 character line width template *************************/
#define HLP_SCREENSHOT "*Commands Screenshot_Video_Window"
"2Screenshot Video Window\n"
" Simulators with Video devices display the simulated video in a window\n"
" on the local system. The contents of that display can be saved in a\n"
" file with the SCREENSHOT command:\n\n"
" SCREENSHOT screenshotfile.bmp\n"
#define HLP_SPAWN "*Commands Executing_System_Commands"
"2Executing System Commands\n"
" The simulator can execute operating system commands with the ! (spawn)\n"
@@ -1722,6 +1729,9 @@ static CTAB cmd_table[] = {
{ "NOEXPECT", &expect_cmd, 0, HLP_EXPECT },
{ "!", &spawn_cmd, 0, HLP_SPAWN },
{ "HELP", &help_cmd, 0, HLP_HELP },
#if defined(USE_SIM_VIDEO)
{ "SCREENSHOT", &screenshot_cmd,0, HLP_SCREENSHOT },
#endif
{ NULL, NULL, 0 }
};
@@ -2589,6 +2599,15 @@ printf ("\n");
return status;
}
/* Screenshot command */
t_stat screenshot_cmd (int32 flag, char *cptr)
{
if ((cptr == NULL) || (strlen (cptr) == 0))
return SCPE_ARG;
return vid_screenshot (cptr);
}
/* Echo command */
t_stat echo_cmd (int32 flag, char *cptr)