Commit ba1c4c8f authored by Ben Avison's avatar Ben Avison
Browse files

Hourglass depth now incremented by 1 between calls to Wimp_Poll; effect is to...

Hourglass depth now incremented by 1 between calls to Wimp_Poll; effect is to automatically display hourglass whenever applications hog the CPU, irrespective of whether they already display the hourglass themselves or not.

Hourglass is automatically smashed before any Command Windows are displayed
so that output-generating single-tasking programs are not forced to show the
hourglass due to the behaviour described above.
parent 3f4a742b
......@@ -92,5 +92,6 @@
OptionD mjs2, false ; Mike's debugs 2
OptionD mjs3, false ; Mike's debugs 3
OptionD mjs4, false ; Mike's debugs 4 (TransferBlock)
OptionD autohg, false ; AutoHourglass
END
......@@ -56,6 +56,7 @@
Option IconiseButton, false ; Windows given iconise button
Option ChocolateScreen, false ; Clean cached screen after redraw loops
Option StretchErrorButtons, true ; Stretch buttons in error box to fit text
Option AutoHourglass, false ; Hourglass automatically on between Wimp_Polls
Option RegisterMessages, false
Option RegisterTools2D, false
......
......@@ -18,6 +18,7 @@
Option IconiseButton, true ; Windows given iconise button
Option ChocolateScreen, true ; Clean cached screen after redraw loops
Option AutoHourglass, true ; Hourglass automatically on between Wimp_Polls (requires Ursula Task Manager and Hourglass)
ASSERT International_Help <> 0
......
......@@ -4,8 +4,8 @@
GBLS VString
GBLS Date
Version SETA 393
VString SETS "3.93"
Date SETS "11 Jun 1997"
Version SETA 394
VString SETS "3.94"
Date SETS "03 Jul 1997"
END
......@@ -2433,6 +2433,10 @@ sz_scrbot2 * 0
sz_scrbot * 0 ; was 96 (to allow for icon bar)
sz_scrtop * 1024
[ AutoHourglass
hourglass_delay * 33 ; delay before showing hourglass for "dodgy apps" in 1/100 secs
]
; contents of task word if task is dead
......@@ -4363,6 +4367,12 @@ mywrch
MOV R14,#cf_active
STR R14,commandflag
[ Version >= 394 :LAND: AutoHourglass
SWI XHourglass_Smash ; the easy option for consistent behaviour
CLRV
Debug autohg,"Hourglass_Smash at CommandWindow start"
]
; optimisation - if first char is 22 (mode change),
; don't bother about window cos it'll be overwritten anyway
......
......@@ -191,6 +191,15 @@ SWIWimp_Initialise
initfirsttask
Push "R0-R3"
[ Version >= 394 :LAND: AutoHourglass
Push "R0"
BL pointeron
MOV R0,#1
SWI XHourglass_Start
CLRV
Pull "R0"
Debug autohg,"Hourglass_Start at initfirsttask"
]
;
[ true
LDR R0,currentmode
......@@ -1955,6 +1964,14 @@ closelast
ADRL R1,UpCallCode
BL release
;
[ Version >= 394 :LAND: AutoHourglass
Push "R0"
SWI XHourglass_Smash
CLRV
Pull "R0"
Debug autohg,"Hourglass_Smash at closelast"
]
[ Version >= 317
[ mousecache
MOV R0,#TickerV ; tidy the mouse handler
......
......@@ -290,6 +290,18 @@ SWIWimp_Poll
01
MyEntry "Poll"
[ Version >= 394 :LAND: AutoHourglass
Push "R0"
SWI XHourglass_Off
CLRV
Pull "R0"
[ debugautohg
Push "handle"
LDR handle,taskhandle
Debug autohg,"Hourglass_Off at Wimp_Poll start, taskhandle =",handle
Pull "handle"
]
]
;
; remember task number, to allow optimisation of return to caller
;
......
......@@ -821,6 +821,19 @@ SWIWimp_StartTask
runthetask
MOV R1,R0 ; close down the task !!!
SWI Wimp_CloseDown
[ Version >= 394 :LAND: AutoHourglass
MOV R0,PC ; \
AND R0,R0,#3 ; > just in case we're not in USR mode...
EOR R0,R0,#SVC_mode ; /
SWI XOS_EnterOS ; because we need a stack
Push "R0"
SWI XHourglass_Off
CLRV
Pull "R0"
Debug autohg,"Hourglass_Off at Wimp_StartTask child task entry point"
TEQP R0,PC ; return to original processor mode
NOP
]
MOV R0,R1
SWI OS_CLI ; R0 --> OS_CLI command
SWI OS_Exit ; exit back to Wimp
......@@ -1102,6 +1115,19 @@ returnerror
CMP R0,#-1
BEQ repollwimp ; if it claimed then just re-poll
01
[ Version >= 394 :LAND: AutoHourglass
Push "R0"
MOV R0,#hourglass_delay
SWI XHourglass_Start
CLRV
Pull "R0"
[ debugautohg
Push "handle"
LDR handle,taskhandle
Debug autohg,"Hourglass_On at Wimp_Poll end, taskhandle =",handle
Pull "handle"
]
]
BL DeletePollTask ; Delete task from polltask list
; don't need to do callback if this is the same task
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment