Added menu option to send CTRL-ALT-DELETE to emulated machine. Patch from GeeDee.
This commit is contained in:
parent
13226a2bd4
commit
2be271d050
5 changed files with 20 additions and 0 deletions
|
|
@ -478,3 +478,5 @@ extern int infocus;
|
||||||
|
|
||||||
void onesec();
|
void onesec();
|
||||||
|
|
||||||
|
void resetpc_cad();
|
||||||
|
|
||||||
|
|
|
||||||
10
src/pc.c
10
src/pc.c
|
|
@ -277,6 +277,16 @@ void resetpc()
|
||||||
shadowbios=0;
|
shadowbios=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resetpc_cad()
|
||||||
|
{
|
||||||
|
keyboard_send(29); /* Ctrl key pressed */
|
||||||
|
keyboard_send(56); /* Alt key pressed */
|
||||||
|
keyboard_send(83); /* Delete key pressed */
|
||||||
|
keyboard_send(157); /* Ctrl key released */
|
||||||
|
keyboard_send(184); /* Alt key released */
|
||||||
|
keyboard_send(211); /* Delete key released */
|
||||||
|
}
|
||||||
|
|
||||||
void resetpchard()
|
void resetpchard()
|
||||||
{
|
{
|
||||||
device_close_all();
|
device_close_all();
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ BEGIN
|
||||||
POPUP "&File"
|
POPUP "&File"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Hard Reset", IDM_FILE_HRESET
|
MENUITEM "&Hard Reset", IDM_FILE_HRESET
|
||||||
|
MENUITEM "&Ctrl+Alt+Del", IDM_FILE_RESET_CAD
|
||||||
MENUITEM "E&xit", IDM_FILE_EXIT
|
MENUITEM "E&xit", IDM_FILE_EXIT
|
||||||
END
|
END
|
||||||
POPUP "&Disc"
|
POPUP "&Disc"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#define IDM_FILE_RESET 40000
|
#define IDM_FILE_RESET 40000
|
||||||
#define IDM_FILE_HRESET 40001
|
#define IDM_FILE_HRESET 40001
|
||||||
#define IDM_FILE_EXIT 40002
|
#define IDM_FILE_EXIT 40002
|
||||||
|
#define IDM_FILE_RESET_CAD 40003
|
||||||
#define IDM_DISC_A 40010
|
#define IDM_DISC_A 40010
|
||||||
#define IDM_DISC_B 40011
|
#define IDM_DISC_B 40011
|
||||||
#define IDM_EJECT_A 40012
|
#define IDM_EJECT_A 40012
|
||||||
|
|
|
||||||
|
|
@ -763,6 +763,12 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
resetpchard();
|
resetpchard();
|
||||||
pause=0;
|
pause=0;
|
||||||
break;
|
break;
|
||||||
|
case IDM_FILE_RESET_CAD:
|
||||||
|
pause=1;
|
||||||
|
Sleep(100);
|
||||||
|
resetpc_cad();
|
||||||
|
pause=0;
|
||||||
|
break;
|
||||||
case IDM_FILE_EXIT:
|
case IDM_FILE_EXIT:
|
||||||
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
|
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue