[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/fbsup.h gui/fb.cpp
From: |
Udo Giacomozzi |
Subject: |
[Gnash-commit] gnash ChangeLog gui/fbsup.h gui/fb.cpp |
Date: |
Thu, 20 Dec 2007 15:35:42 +0000 |
CVSROOT: /cvsroot/gnash
Module name: gnash
Changes by: Udo Giacomozzi <udog> 07/12/20 15:35:42
Modified files:
. : ChangeLog
gui : fbsup.h fb.cpp
Log message:
gui/fbsup.h, gui/fb.cpp: Calculate rowsize from virtual resolution
instead from visible resolution
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5226&r2=1.5227
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fbsup.h?cvsroot=gnash&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fb.cpp?cvsroot=gnash&r1=1.45&r2=1.46
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.5226
retrieving revision 1.5227
diff -u -b -r1.5226 -r1.5227
--- ChangeLog 20 Dec 2007 14:28:49 -0000 1.5226
+++ ChangeLog 20 Dec 2007 15:35:41 -0000 1.5227
@@ -1,3 +1,8 @@
+2007-12-20 Udo Giacomozzi <address@hidden>
+
+ * gui/fbsup.h, gui/fb.cpp: Calculate rowsize from virtual resolution
+ instead from visible resolution
+
2007-12-19 Sandro Santilli <address@hidden>
* server/as_object.cpp: implement callMethod taking 3 args.
Index: gui/fbsup.h
===================================================================
RCS file: /cvsroot/gnash/gnash/gui/fbsup.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- gui/fbsup.h 6 Dec 2007 14:59:46 -0000 1.23
+++ gui/fbsup.h 20 Dec 2007 15:35:42 -0000 1.24
@@ -128,6 +128,7 @@
int m_stage_width;
int m_stage_height;
+ unsigned m_rowsize;
int input_fd; /// file descriptor for /dev/input/mice
int keyb_fd; /// file descriptor for /dev/input/event* (keyboard)
Index: gui/fb.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/gui/fb.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- gui/fb.cpp 6 Dec 2007 14:59:46 -0000 1.45
+++ gui/fb.cpp 20 Dec 2007 15:35:42 -0000 1.46
@@ -351,7 +351,9 @@
set_render_handler(agg_handler);
- agg_handler->init_buffer(_mem, _size, _width, _height, _width*((_bpp+7)/8));
+ m_rowsize = var_screeninfo.xres_virtual*((_bpp+7)/8);
+
+ agg_handler->init_buffer(_mem, _size, _width, _height, m_rowsize);
disable_terminal();
@@ -405,10 +407,6 @@
// NOTE: +7 to support 15 bpp
const unsigned int pixel_size = (var_screeninfo.bits_per_pixel+7)/8;
- // Size, in bytes, of a framebuffer row
- const unsigned int scanline_size =
- var_screeninfo.xres * pixel_size;
-
for (unsigned int bno=0; bno < _drawbounds.size(); bno++) {
@@ -425,7 +423,7 @@
for (int y=bounds.getMinY(); y<=maxy; ++y) {
- const unsigned int pixel_index = y * scanline_size + minx*pixel_size;
+ const unsigned int pixel_index = y * m_rowsize + minx*pixel_size;
memcpy(&fbmem[pixel_index], &buffer[pixel_index], row_size);
@@ -597,13 +595,13 @@
return false;
}
- if (ioctl(fd, VT_ACTIVATE, own_vt)) {
+ if (ioctl(fd, VT_ACTIVATE, own_vt) == -1) {
log_msg("WARNING: Could not activate VT number %d", own_vt);
close(fd);
return false;
}
- if (ioctl(fd, VT_WAITACTIVE, own_vt)) {
+ if (ioctl(fd, VT_WAITACTIVE, own_vt) == -1) {
log_msg("WARNING: Error waiting for VT %d becoming active", own_vt);
//close(tty);
//return false; don't abort
@@ -613,15 +611,39 @@
own_vt = original_vt; // keep on using the original VT
+ close(fd);
+
+ // Activate our new VT
+ tty = find_accessible_tty(own_vt);
+ if (!tty) {
+ log_msg("WARNING: Could not find device for VT number %d", own_vt);
+ return false;
+ }
+
+ fd = open(tty, O_RDWR);
+ if (fd<0) {
+ log_msg("WARNING: Could not open %s", tty);
+ return false;
+ }
+
+ /*
+ // Become session leader and attach to terminal
+ setsid();
+ if (ioctl(fd, TIOCSCTTY, 0) == -1) {
+ log_msg("WARNING: Could not attach controlling terminal (%s)", tty);
+ }
+ */
+
+
#endif
// Disable keyboard cursor
- if (ioctl(fd, KDGETMODE, &original_kd)) {
+ if (ioctl(fd, KDGETMODE, &original_kd) == -1) {
log_msg("WARNING: Could not query current keyboard mode on VT");
}
- if (ioctl(fd, KDSETMODE, KD_GRAPHICS)) {
+ if (ioctl(fd, KDSETMODE, KD_GRAPHICS) == -1) {
log_msg("WARNING: Could not switch to graphics mode on new VT");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/fbsup.h gui/fb.cpp,
Udo Giacomozzi <=