[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. d845f031608310d35422
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. d845f031608310d35422d9cb67d5a60aef367d21 |
Date: |
Thu, 11 Nov 2010 21:49:16 +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 d845f031608310d35422d9cb67d5a60aef367d21 (commit)
from 89337dc857cb685ad6222695821cb9fc3ef313f9 (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=d845f031608310d35422d9cb67d5a60aef367d21
commit d845f031608310d35422d9cb67d5a60aef367d21
Author: Sandro Santilli <address@hidden>
Date: Thu Nov 11 22:48:53 2010 +0100
Allow -X and -Y to take a negative value to express offset from right or
bottom
diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index a205be9..5b7316e 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -287,7 +287,7 @@ FBGui::init(int argc, char *** argv)
// Let -j -k override "window" size
optind = 0; opterr = 0; char c;
- while ((c = getopt (argc, *argv, "j:k:")) != -1) {
+ while ((c = getopt (argc, *argv, "j:k:X:Y:")) != -1) {
switch (c) {
case 'j':
_width = clamp<int>(atoi(optarg), 1, _width);
@@ -295,10 +295,24 @@ FBGui::init(int argc, char *** argv)
case 'k':
_height = clamp<int>(atoi(optarg), 1, _height);
break;
+ case 'X':
+ _xpos = atoi(optarg);
+ break;
+ case 'Y':
+ _ypos = atoi(optarg);
+ break;
}
}
- log_debug("Width:%d, Height:%d");
+ if ( _xpos < 0 ) _xpos += var_screeninfo.xres - _width;
+ _xpos = clamp<int>(_xpos, 0, var_screeninfo.xres-_width);
+
+ if ( _ypos < 0 ) _ypos += var_screeninfo.yres - _height;
+ _ypos = clamp<int>(_ypos, 0, var_screeninfo.yres-_height);
+
+ log_debug("Width:%d, Height:%d", _width, _height);
+ log_debug("X:%d, Y:%d", _xpos, _ypos);
+
_validbounds.setTo(0, 0, _width - 1, _height - 1);
return true;
@@ -444,11 +458,8 @@ FBGui::renderBuffer()
bool
FBGui::createWindow(const char* /*title*/, int /*width*/, int /*height*/,
- int xPosition, int yPosition)
+ int /*xPosition*/, int /*yPosition*/)
{
- _xpos = clamp<int>(xPosition, 0, var_screeninfo.xres-_width);
- _ypos = clamp<int>(yPosition, 0, var_screeninfo.yres-_height);
-
// Now initialize AGG
return initialize_renderer();
}
-----------------------------------------------------------------------
Summary of changes:
gui/fb/fb.cpp | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. d845f031608310d35422d9cb67d5a60aef367d21,
Sandro Santilli <=