mirror of
https://github.com/simh/simh.git
synced 2026-02-26 16:54:22 +00:00
IBM1130: Fix GUI POWER and RESET buttons to properly synch with main thread
as reported in #451
This commit is contained in:
@@ -1156,7 +1156,6 @@ void HandleCommand (HWND hWnd, WORD wNotify, WORD idCtl, HWND hwCtl)
|
||||
switch (idCtl) {
|
||||
case IDC_POWER: /* toggle system power */
|
||||
power = ! power;
|
||||
reset_all(0);
|
||||
if (running && ! power) { /* turning off */
|
||||
reason = STOP_POWER_OFF;
|
||||
/* wait for execution thread to exit */
|
||||
@@ -1166,6 +1165,7 @@ void HandleCommand (HWND hWnd, WORD wNotify, WORD idCtl, HWND hwCtl)
|
||||
* Sleep(10);
|
||||
*/
|
||||
}
|
||||
stuff_and_wait("reset", 0, 500);
|
||||
|
||||
btn[IDC_POWER_ON].state = power;
|
||||
EnableWindow(btn[IDC_POWER_ON].hBtn, power);
|
||||
@@ -1234,7 +1234,7 @@ void HandleCommand (HWND hWnd, WORD wNotify, WORD idCtl, HWND hwCtl)
|
||||
|
||||
case IDC_RESET:
|
||||
if (! running) { /* check-reset is disabled while running */
|
||||
reset_all(0);
|
||||
stuff_and_wait("reset", 0, 500);
|
||||
forms_check(0); /* clear forms-check status */
|
||||
print_check(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user