Commit 2cd5aedb authored by Mark Moriarty's avatar Mark Moriarty

wxwindows update for WIN32 wxSpinCtrl, restrict range to valid integer (-32768, 32767)

parent 5b5c2f30
...@@ -447,7 +447,11 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, ...@@ -447,7 +447,11 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
common_opt_sizer->Add( caching_checkbox, 0, common_opt_sizer->Add( caching_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL ); wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
caching_value = new wxSpinCtrl( panel, CachingChange_Event ); caching_value = new wxSpinCtrl( panel, CachingChange_Event );
#ifdef WIN32 /* WIN32 uses 16 bit integer */
caching_value->SetRange( 0, 32767 );
#else
caching_value->SetRange( 0, 1000000 ); caching_value->SetRange( 0, 1000000 );
#endif
caching_value->Disable(); caching_value->Disable();
common_opt_sizer->Add( caching_value, 0, common_opt_sizer->Add( caching_value, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL ); wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
......
...@@ -695,14 +695,13 @@ IntegerConfigControl::IntegerConfigControl( vlc_object_t *p_this, ...@@ -695,14 +695,13 @@ IntegerConfigControl::IntegerConfigControl( vlc_object_t *p_this,
: ConfigControl( p_this, p_item, parent ) : ConfigControl( p_this, p_item, parent )
{ {
label = new wxStaticText(this, -1, wxU(p_item->psz_text)); label = new wxStaticText(this, -1, wxU(p_item->psz_text));
// FIXME -- Hack for nonstandard wxwin wxSpinCtrl operation under WIN32 #ifdef WIN32 //WIN32 only uses a 16 bit integer
#ifdef WIN32
spin = new wxSpinCtrl( this, -1, spin = new wxSpinCtrl( this, -1,
wxString::Format(wxT("%d"), wxString::Format(wxT("%d"),
p_item->i_value), p_item->i_value),
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS, wxSP_ARROW_KEYS,
100000000, -100000000, p_item->i_value); -32768,32767, p_item->i_value);
#else #else
spin = new wxSpinCtrl( this, -1, spin = new wxSpinCtrl( this, -1,
wxString::Format(wxT("%d"), wxString::Format(wxT("%d"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment