diff --git a/lib/make/mb_autoexec.mk b/lib/make/mb_autoexec.mk index d6e4525..0774715 100644 --- a/lib/make/mb_autoexec.mk +++ b/lib/make/mb_autoexec.mk @@ -24,7 +24,7 @@ define mb_autoexec_append_stop_fail endef define mb_autoexec_append_exit $(if $(filter on,$(MB_FLIGHT_SCREEN)),$(call mb_autoexec_append_save_screenshot,$(1))) - $(call mb_autoexec_append_cmd,$(1),omsxctl boot_exec_exit) + $(call mb_autoexec_append_cmd,$(1),omsxctl headless_exit) endef define mb_autoexec_append_joyporta_mouse $(call mb_autoexec_append_cmd,$(1),omsxctl plug joyporta mouse) diff --git a/lib/openmsx/share/scripts/boot_exec.tcl b/lib/openmsx/share/scripts/boot_exec.tcl index 7529c19..1663d60 100644 --- a/lib/openmsx/share/scripts/boot_exec.tcl +++ b/lib/openmsx/share/scripts/boot_exec.tcl @@ -2,9 +2,6 @@ # # Adds the following command to openMSX; # -# 'boot_exec_exit' -# Requested delayed shutdown of openMSX. -# # 'boot_exec_color_dark' # Sets the VDP colors to dark color tones. # @@ -12,11 +9,6 @@ # Displays machine and openMSX version on one line. # -proc boot_exec_exit {} { - after time 1 "exit 0" - return "Shutdown openMSX" -} - proc boot_exec_color_dark {} { setcolor 4 000 setcolor 15 777 diff --git a/lib/openmsx/share/scripts/headless.tcl b/lib/openmsx/share/scripts/headless.tcl index d938696..f8ed69e 100644 --- a/lib/openmsx/share/scripts/headless.tcl +++ b/lib/openmsx/share/scripts/headless.tcl @@ -4,6 +4,9 @@ # # Adds the following command to openMSX; # +# 'headless_exit' +# A normal exit of the openMSX emulator. +# # 'headless_show_gui' # Enables the renderer and throttle from the inside. # @@ -27,6 +30,11 @@ set boot_env_renderer_type 0 +proc headless_exit {} { + after time 1 "exit 0" + return "Shutdown openMSX" +} + proc headless_show_gui {} { global renderer global throttle