summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c3
-rw-r--r--config.h4
-rw-r--r--menu.c11
-rw-r--r--menu.h5
4 files changed, 11 insertions, 12 deletions
diff --git a/config.c b/config.c
index 59dfcef2..47155df8 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c,v 1.113 2012-03-17 19:40:48 phintuka Exp $
+ * $Id: config.c,v 1.114 2012-03-19 11:29:14 phintuka Exp $
*
*/
@@ -714,6 +714,7 @@ config_t::config_t() {
media_enable_delete = 0;
main_menu_mode = ShowMenu;
+ last_hotkey = -1;//kNone;
force_primary_device = 0;
};
diff --git a/config.h b/config.h
index 7ccf5a18..20a90a0c 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h,v 1.88 2012-03-17 19:46:23 phintuka Exp $
+ * $Id: config.h,v 1.89 2012-03-19 11:29:14 phintuka Exp $
*
*/
@@ -267,6 +267,8 @@ class config_t {
// OSD state
eMainMenuMode main_menu_mode; // used internally to open right sub-menu
cOsdObject *pending_menu_action; // used to replace current OSD with another type of OSD object
+ time_t last_hotkey_time;
+ int/*eKeys*/ last_hotkey;
// local frontend settings
char local_frontend[64];
diff --git a/menu.c b/menu.c
index c4f86d73..c0a152f8 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c,v 1.95 2012-03-19 11:07:52 phintuka Exp $
+ * $Id: menu.c,v 1.96 2012-03-19 11:29:14 phintuka Exp $
*
*/
@@ -574,9 +574,6 @@ eOSState cMenuBrowseFiles::ProcessKey(eKeys Key)
#include "tools/display_message.h"
-time_t cMenuXinelib::g_LastHotkeyTime = 0;
-eKeys cMenuXinelib::g_LastHotkey = kNone;
-
cMenuXinelib::cMenuXinelib(cXinelibDevice *Dev)
{
m_Dev = Dev;
@@ -741,7 +738,7 @@ eOSState cMenuXinelib::ProcessHotkey(eKeys Key)
eOSState NewState = osEnd;
cString Message;
time_t now = time(NULL);
- bool OnlyInfo = ((g_LastHotkeyTime < now-3) || g_LastHotkey != Key);
+ bool OnlyInfo = ((xc.last_hotkey_time < now-3) || xc.last_hotkey != Key);
switch (Key) {
case HOTKEY_DVD:
@@ -949,8 +946,8 @@ eOSState cMenuXinelib::ProcessHotkey(eKeys Key)
xc.pending_menu_action = new cDisplayMessage(Message);
}
- g_LastHotkeyTime = now;
- g_LastHotkey = Key;
+ xc.last_hotkey_time = now;
+ xc.last_hotkey = Key;
return NewState;
}
diff --git a/menu.h b/menu.h
index e7386330..e251eeb1 100644
--- a/menu.h
+++ b/menu.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.h,v 1.10 2012-03-19 11:21:33 phintuka Exp $
+ * $Id: menu.h,v 1.11 2012-03-19 11:29:14 phintuka Exp $
*
*/
@@ -27,8 +27,7 @@ class cMenuXinelib : public cMenuSetupPage
// Hotkeys
enum { hkInit, hkSeen, hkNone } hotkey_state;
- static time_t g_LastHotkeyTime;
- static eKeys g_LastHotkey;
+
virtual eOSState ProcessHotkey(eKeys Key);
cOsdItem *audio_ctrl_compress;