GOP: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
m Bot: Replace deprecated source tag with syntaxhighlight
m Bot: Replace deprecated source tag with syntaxhighlight
Line 38: Line 38:
=== Query Available Video Modes ===
=== Query Available Video Modes ===
Similarly to VESA, there's no standard mode codes, rather you have a function to query the available modes. Now you know how many modes there are (numModes above), and which one is currently set (nativeMode). You can iterate on the modes and query the information structure for each:
Similarly to VESA, there's no standard mode codes, rather you have a function to query the available modes. Now you know how many modes there are (numModes above), and which one is currently set (nativeMode). You can iterate on the modes and query the information structure for each:
<source lang="c">
<syntaxhighlight lang="c">
for (i = 0; i < numModes; i++) {
for (i = 0; i < numModes; i++) {
status = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo, &info);
status = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo, &info);
Line 49: Line 49:
);
);
}
}
</syntaxhighlight>
</source>


=== Set Video Mode and Get the Framebuffer ===
=== Set Video Mode and Get the Framebuffer ===