Mercurial > mplayer.hg
comparison linux/vbelib.c @ 2693:1a8e5e017b1d
triple buffering interface
author | nick |
---|---|
date | Sun, 04 Nov 2001 18:06:31 +0000 |
parents | 44ff6b5c7cea |
children | 74731185c5c9 |
comparison
equal
deleted
inserted
replaced
2692:b8e628b7a029 | 2693:1a8e5e017b1d |
---|---|
552 unsigned long pixel_num; | 552 unsigned long pixel_num; |
553 memset(&r,0,sizeof(struct LRMI_regs)); | 553 memset(&r,0,sizeof(struct LRMI_regs)); |
554 pixel_num = offset%(unsigned long)curr_mode_info.BytesPerScanLine; | 554 pixel_num = offset%(unsigned long)curr_mode_info.BytesPerScanLine; |
555 if(pixel_num*(unsigned long)curr_mode_info.BytesPerScanLine!=offset) pixel_num++; | 555 if(pixel_num*(unsigned long)curr_mode_info.BytesPerScanLine!=offset) pixel_num++; |
556 r.eax = 0x4f07; | 556 r.eax = 0x4f07; |
557 r.ebx = vsync ? 0x80 : 0; | 557 r.ebx = vsync ? 0x82 : 2; |
558 r.ecx = pixel_num; | 558 r.ecx = pixel_num; |
559 r.edx = offset/(unsigned long)curr_mode_info.BytesPerScanLine; | 559 r.edx = offset/(unsigned long)curr_mode_info.BytesPerScanLine; |
560 if(!VBE_LRMI_int(0x10,&r)) return VBE_VM86_FAIL; | 560 if(!VBE_LRMI_int(0x10,&r)) return VBE_VM86_FAIL; |
561 retval = r.eax & 0xffff; | 561 retval = r.eax & 0xffff; |
562 if(retval == 0x4f) retval = VBE_OK; | 562 if(retval == 0x4f) retval = VBE_OK; |
563 #endif | 563 #endif |
564 retval = VBE_BROKEN_BIOS; | 564 retval = VBE_BROKEN_BIOS; |
565 } | 565 } |
566 return retval; | |
567 } | |
568 | |
569 int vbeSetScheduledDisplayStart(unsigned long offset, int vsync) | |
570 { | |
571 int retval; | |
572 struct LRMI_regs r; | |
573 unsigned long pixel_num; | |
574 memset(&r,0,sizeof(struct LRMI_regs)); | |
575 pixel_num = offset%(unsigned long)curr_mode_info.BytesPerScanLine; | |
576 if(pixel_num*(unsigned long)curr_mode_info.BytesPerScanLine!=offset) pixel_num++; | |
577 r.eax = 0x4f07; | |
578 r.ebx = vsync ? 0x82 : 2; | |
579 r.ecx = offset; | |
580 if(!VBE_LRMI_int(0x10,&r)) return VBE_VM86_FAIL; | |
581 retval = r.eax & 0xffff; | |
582 if(retval == 0x4f) retval = VBE_OK; | |
566 return retval; | 583 return retval; |
567 } | 584 } |
568 | 585 |
569 struct realVesaProtModeInterface | 586 struct realVesaProtModeInterface |
570 { | 587 { |