There is no requirement for VBE modes to be listed in increasing order of resolution. With the present logic, this can cause e.g. a 1024x768 mode to be selected if the user asks for 640x480, if the 1024x768 mode is earlier in the mode list. Define a scoring system for modes as score = ( width * height - bpp ) and choose the mode with the lowest score among all acceptable modes. This should prefer to choose the mode closest to the requested resolution, with a slight preference for higher colour depths. Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
27 |
|
27 |
|
28 |
|
28 |
|
29 |
|
29 |
|
|
30 |
|
|
30 |
|
31 |
|
31 |
|
32 |
|
32 |
|
33 |
|
|
|
||
211 |
|
212 |
|
212 |
|
213 |
|
213 |
|
214 |
|
214 |
|
|
|
|
215 |
|
|
215 |
|
216 |
|
216 |
|
217 |
|
217 |
|
|
|
218 |
|
218 |
|
219 |
|
219 |
|
220 |
|
|
|
221 |
|
|
|
|
220 |
|
|
|
221 |
|
|
222 |
|
222 |
|
223 |
|
223 |
|
224 |
|
224 |
|
225 |
|
|
|
|
225 |
|
|
226 |
|
226 |
|
227 |
|
227 |
|
228 |
|
|
|
229 |
|
|
|
|
228 |
|
|
|
229 |
|
|
|
230 |
|
|
|
231 |
|
|
230 |
|
232 |
|
231 |
|
|
|
232 |
|
|
|
|
233 |
|
|
|
234 |
|
|
233 |
|
235 |
|
234 |
|
236 |
|
|
237 |
|
|
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
|
243 |
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
|
265 |
|
|
|
266 |
|
|
|
267 |
|
|
|
268 |
|
|
|
269 |
|
|
235 |
|
270 |
|
236 |
|
271 |
|
237 |
|
272 |
|
|
|
||
250 |
|
285 |
|
251 |
|
286 |
|
252 |
|
287 |
|
|
288 |
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
253 |
|
299 |
|
254 |
|
300 |
|
255 |
|
301 |
|
256 |
|
302 |
|
257 |
|
|
|
|
303 |
|
|
258 |
|
304 |
|
259 |
|
305 |
|
260 |
|
306 |
|
261 |
|
307 |
|
262 |
|
308 |
|
263 |
|
|
|
|
309 |
|
|
264 |
|
310 |
|
265 |
|
311 |
|
266 |
|
312 |
|
267 |
|
313 |
|
268 |
|
314 |
|
|
315 |
|
|
|
316 |
|
|
|
317 |
|
|
269 |
|
318 |
|
270 |
|
|
|
271 |
|
319 |
|
272 |
|
320 |
|
273 |
|
321 |
|
|
|
||
277 |
|
325 |
|
278 |
|
326 |
|
279 |
|
327 |
|
280 |
|
|
|
281 |
|
|
|
282 |
|
|
|
283 |
|
|
|
284 |
|
|
|
285 |
|
|
|
286 |
|
|
|
287 |
|
|
|
288 |
|
|
|
289 |
|
|
|
|
328 |
|
|
290 |
|
329 |
|
291 |
|
|
|
292 |
|
|
|
293 |
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
|
330 |
|
310 |
|
331 |
|
311 |
|
332 |
|
|
|
||
325 |
|
346 |
|
326 |
|
347 |
|
327 |
|
348 |
|
328 |
|
|
|
329 |
|
|
|
330 |
|
|
|
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
|
352 |
|
|
|
353 |
|
|
|
354 |
|
|
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
331 |
|
362 |
|
332 |
|
|
|
|
363 |
|
|
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
|
367 |
|
|
333 |
|
368 |
|
334 |
|
369 |
|
335 |
|
|
|
336 |
|
|
|
|
370 |
|
|
337 |
|
371 |
|
338 |
|
372 |
|
339 |
|
373 |
|
|
|
||
349 |
|
383 |
|
350 |
|
384 |
|
351 |
|
385 |
|
|
386 |
|
|
352 |
|
387 |
|
353 |
|
388 |
|
354 |
|
389 |
|
|
|
||
361 |
|
396 |
|
362 |
|
397 |
|
363 |
|
398 |
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
|
|
399 |
|
|
|
400 |
|
|
|
401 |
|
|
|
402 |
|
|
367 |
|
403 |
|
|
404 |
|
|
|
405 |
|
|
|
406 |
|
|
|
407 |
|
|
|
408 |
|
|
368 |
|
409 |
|
369 |
|
410 |
|
370 |
|
411 |
|
|
|
||
373 |
|
414 |
|
374 |
|
415 |
|
375 |
|
416 |
|
|
417 |
|
|
376 |
|
418 |
|
377 |
|
419 |
|
378 |
|
420 |
|