Revision 98
identation fix
lab5/graphics.c | ||
---|---|---|
21 | 21 |
if ((r = sys_privctl(SELF, SYS_PRIV_ADD_MEM, &mmr))) |
22 | 22 |
panic("sys_privctl (ADD MEM) failed: %d\n", r); |
23 | 23 |
|
24 |
|
|
25 |
memset(&vbe_mem_info, 0, sizeof(vbe_mode_info_t)); // clear mem_info to initialize it |
|
26 |
|
|
24 | 27 |
if (vbe_get_mode_info(mode, &vbe_mem_info)) { |
25 | 28 |
printf("vbe_get_mode_info: Failed to get VBE Mode Info for mode %x\n", mode); |
26 | 29 |
return LCF_ERROR; |
... | ... | |
42 | 45 |
if (video_mem == MAP_FAILED) |
43 | 46 |
panic("Error: couldn't map video memory."); |
44 | 47 |
|
45 |
memset(®_86, 0, sizeof(reg_86)); // reset struct
|
|
48 |
memset(®_86, 0, sizeof(reg_86)); // reset struct |
|
46 | 49 |
|
47 |
reg_86.intno = VC_BIOS_SERV;
|
|
48 |
reg_86.ah = VBE_CALL;
|
|
49 |
reg_86.al = SET_VBE_MD;
|
|
50 |
reg_86.bx = mode | LINEAR_FRAME_BUFFER_MD;
|
|
50 |
reg_86.intno = VC_BIOS_SERV; |
|
51 |
reg_86.ah = VBE_CALL; |
|
52 |
reg_86.al = SET_VBE_MD; |
|
53 |
reg_86.bx = mode | LINEAR_FRAME_BUFFER_MD; |
|
51 | 54 |
|
52 |
// BIOS CALL
|
|
55 |
// BIOS CALL |
|
53 | 56 |
|
54 |
if (sys_int86(®_86)) { |
|
55 |
printf("%s: sys_int86 failed\n", __func__); |
|
56 |
return BIOS_CALL_ERROR; |
|
57 |
} |
|
58 |
|
|
59 |
memset(&vbe_mem_info, 0, sizeof(vbe_mode_info_t)); // clear mem_info to initialize it |
|
60 |
|
|
61 |
// lm_free(&mem_map); |
|
57 |
if (sys_int86(®_86)) { |
|
58 |
printf("%s: sys_int86 failed\n", __func__); |
|
59 |
return BIOS_CALL_ERROR; |
|
60 |
} |
|
62 | 61 |
return SUCCESS; |
63 | 62 |
} |
Also available in: Unified diff