Add upated UI event throttling to advanced configuration.
This commit is contained in:
parent
56a31900d3
commit
cc9d074a2a
|
@ -189,6 +189,7 @@ static const wxChar ShowEventCounters[] = wxT( "ShowEventCounters" );
|
|||
|
||||
static const wxChar AllowManualCanvasScale[] = wxT( "AllowManualCanvasScale" );
|
||||
|
||||
static const wxChar UpdateUIEventInterval[] = wxT( "UpdateUIEventInterval" );
|
||||
} // namespace KEYS
|
||||
|
||||
|
||||
|
@ -299,6 +300,7 @@ ADVANCED_CFG::ADVANCED_CFG()
|
|||
m_HideVersionFromTitle = false;
|
||||
m_ShowEventCounters = false;
|
||||
m_AllowManualCanvasScale = false;
|
||||
m_UpdateUIEventInterval = 0;
|
||||
|
||||
loadFromConfigFile();
|
||||
}
|
||||
|
@ -363,6 +365,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
&m_CoroutineStackSize, AC_STACK::default_stack,
|
||||
AC_STACK::min_stack, AC_STACK::max_stack ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::UpdateUIEventInterval,
|
||||
&m_UpdateUIEventInterval, 0, -1, 100000 ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowRouterDebugGraphics,
|
||||
&m_ShowRouterDebugGraphics, false ) );
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <wx/filedlg.h>
|
||||
#include <wx/tooltip.h>
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <common.h>
|
||||
#include <config_params.h>
|
||||
#include <confirm.h>
|
||||
|
@ -299,6 +300,9 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
|||
// Windows as other platforms display tooltips while the mouse is not moving
|
||||
wxToolTip::SetAutoPop( 10000 );
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_UpdateUIEventInterval != 0 )
|
||||
wxUpdateUIEvent::SetUpdateInterval( ADVANCED_CFG::GetCfg().m_UpdateUIEventInterval );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,6 +123,16 @@ public:
|
|||
*/
|
||||
int m_CoroutineStackSize;
|
||||
|
||||
/**
|
||||
* The update interval the wxWidgets sends wxUpdateUIEvents to windows.
|
||||
*
|
||||
* The default is 0. Setting this to -1 will disable all automatic UI events. Any other
|
||||
* value is the number of milliseconds between events.
|
||||
*
|
||||
* @see https://docs.wxwidgets.org/3.0/classwx_update_u_i_event.html#a24daac56f682b866baac592e761ccede.
|
||||
*/
|
||||
int m_UpdateUIEventInterval;
|
||||
|
||||
/**
|
||||
* Show PNS router debug graphics
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue