fix: correction fonction bestdriver dans video.c

This commit is contained in:
Nicolas Hordé 2018-12-03 23:16:04 +01:00
parent b8e26a000b
commit 4ce5c7333c
2 changed files with 3 additions and 8 deletions

View File

@ -53,10 +53,6 @@
pushl %%eax\n \ pushl %%eax\n \
mov %%dr3, %%eax \n \ mov %%dr3, %%eax \n \
pushl %%eax\n \ pushl %%eax\n \
mov %%dr4, %%eax \n \
pushl %%eax\n \
mov %%dr5, %%eax \n \
pushl %%eax\n \
mov %%dr6, %%eax \n \ mov %%dr6, %%eax \n \
pushl %%eax\n \ pushl %%eax\n \
mov %%dr7, %%eax \n \ mov %%dr7, %%eax \n \
@ -80,8 +76,6 @@
popl %%eax \n \ popl %%eax \n \
popl %%eax \n \ popl %%eax \n \
popl %%eax \n \ popl %%eax \n \
popl %%eax \n \
popl %%eax \n \
popl %%ss\n \ popl %%ss\n \
popl %%gs\n \ popl %%gs\n \
popl %%fs\n \ popl %%fs\n \

View File

@ -365,14 +365,15 @@ void registerdriver(videofonction *pointer)
/*******************************************************************************/ /*******************************************************************************/
/* Choisi le meilleur driver en terme d'affichage */ /* Choisi le meilleur driver en terme d'affichage */
void apply_bestdriver(void) { void apply_bestdriver(void) {
u32 i=0,j=0; u32 i=0,j;
u8 bestdepth=0x0; u8 bestdepth=0x0;
u8 bestresol=0x0; u32 bestresol=0x0;
u8 bestmode=0x0; u8 bestmode=0x0;
u8* bestdriver=NULL; u8* bestdriver=NULL;
capabilities *cap; capabilities *cap;
while (registred[i].nom!=NULL && i<MAXDRIVERS) { while (registred[i].nom!=NULL && i<MAXDRIVERS) {
cap=registred[i].pointer->getvideo_capabilities(); cap=registred[i].pointer->getvideo_capabilities();
j=0;
while(cap[j].modenumber!=0xFF) { while(cap[j].modenumber!=0xFF) {
if (cap[j].depth>bestdepth && (cap[j].width*cap[j].height)>=bestresol) if (cap[j].depth>bestdepth && (cap[j].width*cap[j].height)>=bestresol)
{ {