[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. f0d8fb800b6b4aa4de0e
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. f0d8fb800b6b4aa4de0efaa7f14ac8ad1757cd84 |
Date: |
Wed, 08 Dec 2010 12:05:14 +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 f0d8fb800b6b4aa4de0efaa7f14ac8ad1757cd84 (commit)
from 4bafbe26756ac4749cb151d8b80e08ad17b557f0 (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=f0d8fb800b6b4aa4de0efaa7f14ac8ad1757cd84
commit f0d8fb800b6b4aa4de0efaa7f14ac8ad1757cd84
Author: Benjamin Wolsey <address@hidden>
Date: Wed Dec 8 13:04:42 2010 +0100
Handle more options in gprocessor.
diff --git a/utilities/processor.cpp b/utilities/processor.cpp
index ecbe1c4..293169b 100644
--- a/utilities/processor.cpp
+++ b/utilities/processor.cpp
@@ -169,43 +169,45 @@ public:
static bool mouseShown = true;
static std::string clipboard;
- if (event == HostMessage::QUERY) {
- return true;
- }
+ switch (event) {
+ case HostMessage::QUERY:
+ return true;
+ case HostMessage::SET_CLIPBOARD:
+ clipboard = boost::any_cast<std::string>(ev.arg());
+ return boost::blank();
+
+ case HostMessage::SHOW_MOUSE:
+ {
+ bool state = mouseShown;
+ mouseShown = boost::any_cast<bool>(ev.arg());
+ return state;
+ }
- if (event == HostMessage::SET_CLIPBOARD) {
- clipboard = boost::any_cast<std::string>(ev.arg());
- }
+ // Some fake values for consistent test results.
+ case HostMessage::SCREEN_RESOLUTION:
+ return std::make_pair(800, 640);
- if (event == HostMessage::SHOW_MOUSE) {
- bool state = mouseShown;
- mouseShown = boost::any_cast<bool>(ev.arg());
- return state;
- }
-
- // Some fake values for consistent test results.
-
- if (event == HostMessage::SCREEN_RESOLUTION) {
- return std::make_pair(800, 640);
- }
-
- if (event == HostMessage::SCREEN_DPI) {
- return 72.0;
- }
-
- if (event == HostMessage::SCREEN_COLOR) {
- return "Color";
- }
-
- if (event == HostMessage::PLAYER_TYPE) {
- return "StandAlone";
- }
+ case HostMessage::SCREEN_DPI:
+ return 72.0;
- return boost::blank();
+ case HostMessage::SCREEN_COLOR:
+ return std::string("Color");
+ case HostMessage::PLAYER_TYPE:
+ return std::string("StandAlone");
+
+ case HostMessage::PIXEL_ASPECT_RATIO:
+ return 0.9978;
+
+ default:
+ log_debug(_("gprocessor does not handle %1% message"), e);
+ break;
+ }
+
+ return boost::blank();
}
- void exit() {
+ virtual void exit() {
std::exit(EXIT_SUCCESS);
}
};
-----------------------------------------------------------------------
Summary of changes:
utilities/processor.cpp | 66 ++++++++++++++++++++++++----------------------
1 files changed, 34 insertions(+), 32 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. f0d8fb800b6b4aa4de0efaa7f14ac8ad1757cd84,
Benjamin Wolsey <=