[Bug Fix] quickscreen clashed with WPS Hotkey browser

chris_s noted:
When you set the WPS hotkey as a QuickScreen item and shuffle through the options,
it eventually gets to the "Open Plugin" option and will show the File Browser,
clashing with the Viewports of the QuickScreen

Change-Id: I3addbbbac5842f89c000c155484d7cb934dc500e
This commit is contained in:
William Wilgus 2022-12-14 23:45:58 -05:00
parent 99839960a2
commit 31759c9e53

View file

@ -60,6 +60,7 @@
#endif #endif
#ifdef HAVE_HOTKEY #ifdef HAVE_HOTKEY
#include "onplay.h" #include "onplay.h"
#include "misc.h" /* current activity */
#endif #endif
#include "voice_thread.h" #include "voice_thread.h"
@ -696,10 +697,13 @@ static void tsc_set_default(void* setting, void* defaultval)
#endif #endif
#ifdef HAVE_HOTKEY #ifdef HAVE_HOTKEY
static void hotkey_callback(int var) static void hotkey_callback(int var)
{
if (get_current_activity() != ACTIVITY_QUICKSCREEN)
{ {
if (get_hotkey_lang_id(var) == LANG_OPEN_PLUGIN) if (get_hotkey_lang_id(var) == LANG_OPEN_PLUGIN)
open_plugin_browse(ID2P(LANG_HOTKEY_WPS)); open_plugin_browse(ID2P(LANG_HOTKEY_WPS));
} }
}
static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value, static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value,
const char* unit) const char* unit)
{ {