Mercurial > mplayer.hg
comparison vidix/drivers/nvidia_vid.c @ 16367:8e859a01904f
fix window position adjustment
author | faust3 |
---|---|
date | Sat, 03 Sep 2005 08:48:59 +0000 |
parents | 6a49dea2c0e2 |
children | b2e4d3f3c0af |
comparison
equal
deleted
inserted
replaced
16366:e054a3c93a26 | 16367:8e859a01904f |
---|---|
504 | 504 |
505 /* Start overlay video. */ | 505 /* Start overlay video. */ |
506 void rivatv_overlay_start (struct rivatv_info *info,int bufno){ | 506 void rivatv_overlay_start (struct rivatv_info *info,int bufno){ |
507 uint32_t base, size, offset, xscale, yscale, pan; | 507 uint32_t base, size, offset, xscale, yscale, pan; |
508 uint32_t value; | 508 uint32_t value; |
509 int x=info->wx?info->wx:8, y=info->wy?info->wy:8; | 509 int x=info->wx, y=info->wy; |
510 int lwidth=info->d_width, lheight=info->d_height; | 510 int lwidth=info->d_width, lheight=info->d_height; |
511 int bps; | 511 int bps; |
512 int i; | 512 int i; |
513 | 513 |
514 size = info->buffer_size; | 514 size = info->buffer_size; |
545 if (bps != 0) | 545 if (bps != 0) |
546 { | 546 { |
547 x = info->wx - (pan % bps) * 8 / info->depth; | 547 x = info->wx - (pan % bps) * 8 / info->depth; |
548 y = info->wy - (pan / bps); | 548 y = info->wy - (pan / bps); |
549 } | 549 } |
550 } else { | |
551 // we can't adjust the window position correctly in textmode | |
552 // setting y to 8 seems to work ok, though | |
553 if(!y)y = info->wy+8; | |
550 } | 554 } |
551 | 555 |
552 /* adjust negative output window variables */ | 556 /* adjust negative output window variables */ |
553 if (x < 0) { | 557 if (x < 0) { |
554 lwidth = info->d_width + x; | 558 lwidth = info->d_width + x; |