Modes are returned in a buffer from qemu with IDs in increasing but not
necessarily consecutive order. (Some modes may be omitted if they don't fit
into the framebuffer.) Two custom modes are appended to the local buffer to
support arbitrary resolutions. The first custom id must be set to +1 of the
last id in the mode buffer, not to the last index +1 of the buffer.
E.G. these are the last entries in the mode buffer returned from QEMU:
Index Mode id (unfortunately named ModeIndex in the struct)
127 134 (last mode returned from QEMU)
128 135 (Not 128!)
If the first custom mode id is set to 128 (the number of modes returned
from QEMU), it will duplicate the id for the mode at index 124. That could
cause the FindMode function which searches the mode list by mode id
to return the wrong mode information.
The custom mode id's are now set to be greater than the last mode id
returned from QEMU.
The last argument in the FillVidModeInfo is replaced with the actual mode
id rather than the index. This does nothing more than replace the mode id
This addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1202424
Updated the comments