[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. a957a28e6bc3cc9a9fa7
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. a957a28e6bc3cc9a9fa7851daabfb5de618694a5 |
Date: |
Thu, 11 Nov 2010 15:58:13 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via a957a28e6bc3cc9a9fa7851daabfb5de618694a5 (commit)
via a2dc30349df950964eb19e09606a1f9260c682cf (commit)
from 7e8fac19d3b130e13179570e9fbe90aa85d4317f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=a957a28e6bc3cc9a9fa7851daabfb5de618694a5
commit a957a28e6bc3cc9a9fa7851daabfb5de618694a5
Merge: a2dc303 7e8fac1
Author: Sandro Santilli <address@hidden>
Date: Thu Nov 11 16:58:01 2010 +0100
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/gnash
http://git.savannah.gnu.org/cgit//commit/?id=a2dc30349df950964eb19e09606a1f9260c682cf
commit a2dc30349df950964eb19e09606a1f9260c682cf
Author: Sandro Santilli <address@hidden>
Date: Thu Nov 11 16:57:25 2010 +0100
Support -j and -k from fb-gui
diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index 76d3ab2..2a54b73 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -195,7 +195,7 @@ FBGui::FBGui(unsigned long xid, float scale, bool loop,
RunResources& r)
// memset(mouse_buf, 0, 256);
memset(&var_screeninfo, 0, sizeof(fb_var_screeninfo));
memset(&fix_screeninfo, 0, sizeof(fb_fix_screeninfo));
-
+
signal(SIGINT, terminate_signal);
signal(SIGTERM, terminate_signal);
}
@@ -259,7 +259,7 @@ FBGui::set_grayscale_lut8()
}
bool
-FBGui::init(int /*argc*/, char *** /*argv*/)
+FBGui::init(int argc, char *** argv)
{
GNASH_REPORT_FUNCTION;
@@ -313,6 +313,24 @@ FBGui::init(int /*argc*/, char *** /*argv*/)
}
#endif
+ // Set "window" size
+ _width = var_screeninfo.xres;
+ _height = var_screeninfo.yres;
+
+ // Let -j -k override "window" size
+ optind = 0; opterr = 0; char c;
+ while ((c = getopt (argc, *argv, "j:k:")) != -1) {
+ switch (c) {
+ case 'j':
+ _width = atoi(optarg);
+ break;
+ case 'k':
+ _height = atoi(optarg);
+ break;
+ }
+ }
+
+
return true;
}
@@ -321,12 +339,6 @@ FBGui::initialize_renderer()
{
GNASH_REPORT_FUNCTION;
- // TODO: do not reset _width and _height
- // if they were set trough -j / -k
-
- _width = var_screeninfo.xres;
- _height = var_screeninfo.yres;
-
_validbounds.setTo(0, 0, _width - 1, _height - 1);
const int bpp = var_screeninfo.bits_per_pixel;
@@ -463,15 +475,9 @@ FBGui::renderBuffer()
}
bool
-FBGui::createWindow(const char* /*title*/, int width, int height,
+FBGui::createWindow(const char* /*title*/, int /*width*/, int /*height*/,
int /*xPosition*/, int /*yPosition*/)
{
- assert(width>0);
- assert(height>0);
-
- _width = width;
- _height = height;
-
// Now initialize AGG
return initialize_renderer();
}
-----------------------------------------------------------------------
Summary of changes:
gui/fb/fb.cpp | 36 +++++++++++++++++++++---------------
1 files changed, 21 insertions(+), 15 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. a957a28e6bc3cc9a9fa7851daabfb5de618694a5,
Sandro Santilli <=