diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-12 17:59:47 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-12 17:59:47 +0000 |
commit | faf2f98c85948a73d701ca61d03ccd95d6dd8af9 (patch) | |
tree | c6602acfa5e5ccf55a87b7dd003fec40bf440b7c /libvo | |
parent | aa2581c594df37a67475b3c44a658fba2f952be1 (diff) | |
download | mpv-faf2f98c85948a73d701ca61d03ccd95d6dd8af9.tar.bz2 mpv-faf2f98c85948a73d701ca61d03ccd95d6dd8af9.tar.xz |
-geometry fix (untested!)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8919 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_fbdev.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c index 03e8d75d51..28d18510a3 100644 --- a/libvo/vo_fbdev.c +++ b/libvo/vo_fbdev.c @@ -1039,6 +1039,13 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, image_width=width; image_height=height; } + + if(fb_xres > image_width) + x_offset = (fb_xres - image_width) / 2; + else x_offset = 0; + if(fb_yres > image_height) + y_offset = (fb_yres - image_height) / 2; + else y_offset = 0; geometry(&x_offset,&y_offset,fb_xres,fb_yres,image_width,image_height); if(vidix_init(width,height,x_offset,y_offset,image_width, @@ -1056,7 +1063,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, else #endif { - int x_offset,y_offset; + int x_offset=0,y_offset=0; if ((frame_buffer = (uint8_t *) mmap(0, fb_size, PROT_READ | PROT_WRITE, MAP_SHARED, fb_dev_fd, 0)) == (uint8_t *) -1) { printf(FBDEV "Can't mmap %s: %s\n", fb_dev_name, strerror(errno)); |