Commit d1bdba23 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix G16 modes

Detail:
  s/Wimp02 - With Kernel-5_35-4_79_2_210 and later, the greyscale palette flag updates in real time to reflect the current state of the palette. Therefore we must read the state of the flag before we set our colour palette, otherwise we won't know that we need to apply the greyscale fixup afterwards.
Admin:
  Tested on BB-xM


Version 5.43. Tagged as 'Wimp-5_43'
parent be7094e5
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.42"
Module_Version SETA 542
Module_MajorVersion SETS "5.43"
Module_Version SETA 543
Module_MinorVersion SETS ""
Module_Date SETS "28 May 2014"
Module_ApplicationDate SETS "28-May-14"
Module_Date SETS "02 Jul 2014"
Module_ApplicationDate SETS "02-Jul-14"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.42"
Module_HelpVersion SETS "5.42 (28 May 2014)"
Module_FullVersion SETS "5.43"
Module_HelpVersion SETS "5.43 (02 Jul 2014)"
END
/* (5.42)
/* (5.43)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.42
#define Module_MajorVersion_CMHG 5.43
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 May 2014
#define Module_Date_CMHG 02 Jul 2014
#define Module_MajorVersion "5.42"
#define Module_Version 542
#define Module_MajorVersion "5.43"
#define Module_Version 543
#define Module_MinorVersion ""
#define Module_Date "28 May 2014"
#define Module_Date "02 Jul 2014"
#define Module_ApplicationDate "28-May-14"
#define Module_ApplicationDate "02-Jul-14"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.42"
#define Module_HelpVersion "5.42 (28 May 2014)"
#define Module_LibraryVersionInfo "5:42"
#define Module_FullVersion "5.43"
#define Module_HelpVersion "5.43 (02 Jul 2014)"
#define Module_LibraryVersionInfo "5:43"
......@@ -2014,31 +2014,38 @@ int_setmode ROUT
nomodemess
BL recalcpalette ; do this first in case ptr has palette
BLVC int_allbutmode ; sets up mode variables etc.
[ Medusa
[ Medusa
Push "r3-r4"
; for 4bpp & 8bpp, check the OS's greyscale palette flag and set our flag if appropriate
; in 1bpp & 2bpp we don't care, we always use greyscale
; we probably don't care in 8bpp as well (since the OS will have set the palette for us), but we'll still set the flag just to be sure
ADRL R4,greys_mode
LDR R3,log2bpp
MOV R0,#-1
MOV R1,#VduExt_Log2BPP
SWI XOS_ReadModeVariable
MOV R3,R2
TEQ R3,#3
TEQNE R3,#2
BNE %FT50
MOV R0,#-1
MOV R1,#VduExt_ModeFlags
SWI XOS_ReadModeVariable
TST R2,#ModeFlag_GreyscalePalette
ORRNE R3,R3,#128
STRNEB R3,[R4]
50
BL recalcpalette ; do this first in case ptr has palette
BLVC int_allbutmode ; sets up mode variables etc.
ADRL R4,greys_mode ; clobbered by int_allbutmode
LDRB R14,[R4]
TEQ R14,#0
BLNE recalc_greys_palette
Pull "r3-r4"
]
|
BL recalcpalette ; do this first in case ptr has palette
BLVC int_allbutmode ; sets up mode variables etc.
]
; attempt to recache the borders if required
......
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