X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5573f5b828ea7388a25df8402145b149e95c06ad..94d0d21a15fa73ac426480d195d16ee04caf2de8:/src/msw/settings.cpp?ds=sidebyside diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 85f5a95a47..476873b4af 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -377,11 +377,14 @@ static const int gs_metricsMap[] = #else -1, #endif + // SM_SWAPBUTTON is not available under CE and it doesn't make sense to ask + // for it there #ifdef SM_SWAPBUTTON SM_SWAPBUTTON, #else - -1 + -1, #endif + -1 // wxSYS_DCLICK_MSEC - not available as system metric }; // Get a system metric, e.g. scrollbar size @@ -394,6 +397,12 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(w wxCHECK_MSG( index > 0 && (size_t)index < WXSIZEOF(gs_metricsMap), 0, _T("invalid metric") ); + if ( index == wxSYS_DCLICK_MSEC ) + { + // This one is not a Win32 system metric + return ::GetDoubleClickTime(); + } + int indexMSW = gs_metricsMap[index]; if ( indexMSW == -1 ) {