-
Jeffrey Lee authored
Fix *WimpMode/Wimp_SetMode to return an error when given a bad mode selector block. Re-read configured mode on Sevice_Reset. Detail: s/Wimp01 - Reinitialise currentmode on Service_Reset in order to get the correct mode in the case of a GraphicsV driver overriding it (driver may not have been initialised at the time of the first call in module init). Add a bit more mode debugging and ensure ValidateAddress code completely removed under Medusa. s/Wimp02 - Issue OS_CheckModeValid in validatemode so we can detect cases where a valid looking mode selector block doesn't actually map to a mode definition. Add more mode debugging code. Admin: Tested on Raspberry Pi Fixes issue where "F12 -> *BASIC -> MODE 0 -> QUIT -> return" wouldn't restore screen mode correctly if currentmode had been set to a bad mode selector (e.g. after a CMOS reset nukes the LoadModeFile command), due to WimpMode's lack of error checking Note that this merely prevents currentmode being set to a bad mode at the time of *WimpMode/Wimp_SetMode - if a mode which is valid suddenly becomes invalid (e.g. due to loading a new MDF but not reselecting a valid wimp mode) then the Wimp will still fail to set a sensible mode on return to the desktop. Version 5.40. Tagged as 'Wimp-5_40'
fe39094e