Commit 121acd27 authored by ROOL's avatar ROOL :robot:
Browse files

Recache currentmode at the right time

Detail:
  Modification to make the Wimp reread 'currentmode' by calling OS_ReadSysInfo 1 in the following circumstances
  1. On module init (accounts for being softloaded off disc)
  2. At Service_Reset (accounts for any graphics driver starting after it in ROM module order)
  3. When Service_ModeFileChange (new, this catches the new mode selected by an MDF or EDID during !Boot)
  Commoned up these 3 cases into 1 function.
  This restores the design intent that to get the monitor's native resolution it is *not* required to configure the MonitorType=EDID, indeed doing so wouldn't have helped loading EDID off disc if the monitor's data is found to be incorrect and needing overriding.
Admin:
  Tested on a Pandaboard with MonitorType=Auto and resolution chosen as "Native", resulting in a desktop at the panel resolution.

Version 5.57. Tagged as 'Wimp-5_57'
parent 4d355e68
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.56"
Module_Version SETA 556
Module_MajorVersion SETS "5.57"
Module_Version SETA 557
Module_MinorVersion SETS ""
Module_Date SETS "25 Mar 2017"
Module_ApplicationDate SETS "25-Mar-17"
Module_Date SETS "08 Apr 2017"
Module_ApplicationDate SETS "08-Apr-17"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.56"
Module_HelpVersion SETS "5.56 (25 Mar 2017)"
Module_FullVersion SETS "5.57"
Module_HelpVersion SETS "5.57 (08 Apr 2017)"
END
/* (5.56)
/* (5.57)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.56
#define Module_MajorVersion_CMHG 5.57
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 25 Mar 2017
#define Module_Date_CMHG 08 Apr 2017
#define Module_MajorVersion "5.56"
#define Module_Version 556
#define Module_MajorVersion "5.57"
#define Module_Version 557
#define Module_MinorVersion ""
#define Module_Date "25 Mar 2017"
#define Module_Date "08 Apr 2017"
#define Module_ApplicationDate "25-Mar-17"
#define Module_ApplicationDate "08-Apr-17"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.56"
#define Module_HelpVersion "5.56 (25 Mar 2017)"
#define Module_LibraryVersionInfo "5:56"
#define Module_FullVersion "5.57"
#define Module_HelpVersion "5.57 (08 Apr 2017)"
#define Module_LibraryVersionInfo "5:57"
......@@ -3430,17 +3430,7 @@ gotwork
MOV r0, #-1
STR r0, currentmode
|
MOV R0,#1 ; Read configured mode
SWI XOS_ReadSysInfo
Debug mode,"gotwork trying mode",R0
BLVC validatemode ; error if non-graphics mode
MOVVS R0,#27
[ Medusa
BL copy_mode_specifier ; just in case configured mode
; is new style.
]
Debug mode,"setting currentmode",R0
STR R0,currentmode ; altered by Wimp_SetMode
BL read_current_configd_mode
]
;
; Read WimpFlags
......@@ -4053,6 +4043,7 @@ ServiceTable
[ Medusa :LAND: :LNOT: UseAMBControl ;
DCD Service_PagesSafe ; &8F ;
]
DCD Service_ModeFileChanged ; &94 ;
DCD 0 ; terminator
DCD ServiceTable - Module_BaseAddr
......@@ -4083,6 +4074,7 @@ Service
[ Medusa :LAND: :LNOT: UseAMBControl
TEQNE R1, #Service_PagesSafe
]
TEQNE R1, #Service_ModeFileChanged
MOVNE PC, LR
Service2
......@@ -4153,32 +4145,19 @@ Service2
BEQ invalidatecache
TEQ R1,#Service_ModeChanging
BEQ releasewrchvpremodechange
TEQ R1, #Service_ModeFileChanged
BEQ read_current_configd_mode
TEQ R1,#Service_Reset
MOVNE PC,LR
Push "LR" ; called on Service_Reset
[ Medusa :LAND: :LNOT: DontCheckModeOnInit
; Reset currentmode on Service_Reset
; This allows us to get the correct mode in the case of a GraphicsV
; driver overriding the result of OS_ReadSysInfo 1 (as the driver
; probably wasn't initialised at the time we first read the mode)
Push "R0-R2,LR"
MOV R0,#1 ; Read configured mode
SWI XOS_ReadSysInfo
Debug mode,"Service_Reset trying mode",R0
BLVC validatemode ; error if non-graphics mode
MOVVS R0,#27
[ Medusa
BL copy_mode_specifier ; just in case configured mode
; is new style.
]
Debug mode,"setting currentmode",R0
STR R0,currentmode ; altered by Wimp_SetMode
Pull "R0-R2,LR"
; Fall through...
BL read_current_configd_mode
]
initptrs_deallocating ; called on Service_Reset
Push "LR"
BL deallocateptrs
BL initptrs ; re-initialise window stack etc.
BL defaultfilters ; re-register the filter routines
......
......@@ -216,30 +216,9 @@ initfirsttask
STR R0, switchtospr_correctfor
]
;
[ true
LDR R0,currentmode
CMP R0,#-1
; MOVNE R1,#0
; STRNE R1,currentmode
BEQ %FT02
; BL int_setmode
; MOV R1,#1
; ADRL R14,wimpmodebefore
; STRB R1,[R14]
B %FT05
02
]
MOV R0,#1 ; Read configured mode
SWI XOS_ReadSysInfo
Debug mode,"initfirsttask trying mode",R0
BLVC validatemode ; error if non-graphics mode
MOVVS R0,#27
[ Medusa
BL copy_mode_specifier
]
Debug mode,"setting currentmode",R0
STR R0,currentmode ; altered by Wimp_SetMode
BLEQ read_current_configd_mode
05
BL recalcmodevars ; before any SWIs are called!
BL getromsprites
......@@ -1846,6 +1825,24 @@ vduin_scrsize
DCD VduExt_TotalScreenSize
DCD -1
; note_configd_mode
; look at the currently configured mode
read_current_configd_mode ROUT
Push "R0-R2, LR"
MOV R0,#1 ; Read configured mode
SWI XOS_ReadSysInfo
Debug mode,"read_current_configd_mode trying mode",R0
BLVC validatemode ; error if non-graphics mode
MOVVS R0,#27 ; 640x480 fallback
[ Medusa
BL copy_mode_specifier ; just in case configured mode
; is new style.
]
Debug mode,"setting currentmode",R0
STR R0,currentmode ; altered by Wimp_SetMode
Pull "R0-R2, PC"
[ Medusa
; copy_mode_specifier
......
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