changeset 503:4aa16f9ff929

fbdev reset fixed
author szabii
date Wed, 18 Apr 2001 10:59:12 +0000
parents 75c689abb763
children a77e23145686
files libvo/vo_fbdev.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_fbdev.c	Wed Apr 18 10:37:09 2001 +0000
+++ b/libvo/vo_fbdev.c	Wed Apr 18 10:59:12 2001 +0000
@@ -1112,11 +1112,15 @@
 			printf(FBDEV "Can't restore original cmap\n");
 		fb_cmap_changed = 0;
 	}
+//	memset(next_frame, '\0', in_height * in_width * fb_pixel_size);
+//	put_frame();
+	free(next_frame);
+	if (ioctl(fb_dev_fd, FBIOGET_VSCREENINFO, &fb_vinfo))
+		printf(FBDEV "ioctl FBIOGET_VSCREENINFO: %s\n", strerror(errno));
+	fb_orig_vinfo.xoffset = fb_vinfo.xoffset;
+	fb_orig_vinfo.yoffset = fb_vinfo.yoffset;
 	if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_orig_vinfo))
-		printf(FBDEV "Can't set virtual screensize to original value: %s\n", strerror(errno));
+		printf(FBDEV "Can't reset original fb_var_screeninfo: %s\n", strerror(errno));
 	close(fb_dev_fd);
-	memset(next_frame, '\0', in_height * in_width * fb_pixel_size);
-	put_frame();
-	free(next_frame);
 	munmap(frame_buffer, fb_size);
 }