mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 03:08:31 +00:00
[metal] Clean up code for getting pointer to struct mman
(#828)
Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
This commit is contained in:
parent
5a6a4819d4
commit
e47c0cc929
5 changed files with 8 additions and 6 deletions
|
@ -35,7 +35,7 @@ struct Tty _vga_tty;
|
|||
|
||||
void _vga_reinit(struct Tty *tty, unsigned short starty, unsigned short startx,
|
||||
unsigned init_flags) {
|
||||
struct mman *mm = (struct mman *)(BANE + 0x0500);
|
||||
struct mman *mm = __get_mm();
|
||||
unsigned char vid_type = mm->pc_video_type;
|
||||
unsigned short height = mm->pc_video_height, width = mm->pc_video_width,
|
||||
stride = mm->pc_video_stride;
|
||||
|
@ -66,7 +66,7 @@ void _vga_reinit(struct Tty *tty, unsigned short starty, unsigned short startx,
|
|||
|
||||
textstartup void _vga_init(void) {
|
||||
if (IsMetal()) {
|
||||
struct mman *mm = (struct mman *)(BANE + 0x0500);
|
||||
struct mman *mm = __get_mm();
|
||||
unsigned short starty = mm->pc_video_curs_info.y,
|
||||
startx = mm->pc_video_curs_info.x;
|
||||
_vga_reinit(&_vga_tty, starty, startx, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue