- Add some forgotten, or move some misplaced ArcClose() calls so as
to avoid leakages in failure paths. (Thanks to Serge Gautherie for
having caught some of them.)
- Simplify some code; remove unneeded casts; use string-safe functions.
- Factor out disk & partition opening in LoadAndBootPartition() and
LoadAndBootDrive() into a LoadAndBootPartitionOrDrive() helper.
- Use ARC paths and ArcOpen()/ArcRead() instead of calling the
machine-specific BIOS-oriented DiskGetPartitionEntry() and
MachDiskReadLogicalSectors() functions to open the disk/partition
and read their boot sectors.
- Don't forget to close the opened boot sector file in LoadAndBootBootSector().
- Add assertions for DiskReadBufferSize in PcMemFinalizeMemoryMap()
and EnumerateHarddisks().
- x86/amd64 only:
* Add a DisableA20 helper for disabling the A20 line, before rebooting
back, or chain-load a boot sector, into 16-bit world.
Also pulse the output port of the keyboard controller to clear out
its state after having set the state of the A20 line.
* In addition to disabling the A20 line when rebooting or chain-loading
a boot sector, reset the video back to 80x25 text mode.
- Reset the cursor position back to the origin when initializing or
terminating the TUI.
There were menu drawing regression after 03adec8141.
This PR will fix it. CORE-16244
- We don't have to draw the frame manually because of WS_EX_DLGMODALFRAME extended style.
- We don't need the margins (MENU_TOP_MARGIN and MENU_BOTTOM_MARGIN) in the client area any more because the client area doesn't contain the frame width.
- Use GetSystemMetrics(SM_CXDLGFRAME) and GetSystemMetrics(SM_CYDLGFRAME) for frame width.
- Get rid of the FsCloseFile(), FsReadFile(), FsGetFileInformation(),
FsGetFileSize() and FsSetFilePointer() wrappers and use the ARC
functions directly instead. Make FsOpenFile() return an ARC file
descriptor ID of the correct type. Get rid of unused FS_* defines.
- Use TRACEs in the ***Mount() filesystem functions for diagnostics
purposes.
- Remove a leak in FatGetFatEntry(). Assign stuff via QuadPart where
possible in FatMount(). Remove an unused member in FAT_FILE_INFO.
- Reduce code indentation in BtrFsMount() and remove a leak there.
- Disable reading the "BootPath" parameter in the linux loader since
we don't use this parameter (yet??)
We need to initialize SAM before the security services get started, otherwise we will have a running SamSs service although SAM is not initialized at that time. This is no good.
- Add a function that creates a new control set and deletes unused control sets in case of a successful boot.
- Add a stub function that will soon switch to the last known good control set in case of an unsuccessful boot.
CORE-16269
- Add IntGdiAddFontResourceEx function that is extended from IntGdiAddFontResource, in order to add dwFlags parameter.
- Add IntLoadFontsInRegistry function that will load the fonts from registry info.
- If loading from registry failed, IntLoadSystemFonts will be called.
- Use IntLoadFontsInRegistry rather than IntLoadSystemFonts in the OS startup.
- Add NameFromCharSet function.
- Append " (CharSetName)" to registry value name if not TrueType.
With this change we can remove the workaround from the off-screen
menus dropping below their parent.
Many thanks to Joachim for his help debugging / testing this.
CORE-16297
- EditBox: Display the initial contents of the text buffer.
This allows modifying already existing text in the passed buffer.
- Menu:
* Make both MenuHeader and MenuFooter optional (but the latter is
more "optional" than the former...).
* Allow passing a user-provided "Context" structure to the key-press
filter callback, and pass also the index of the menu item that has
been selected.
- Minor formatting fixes.