X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/553c5bcc3ab65e8b8a002dc6d5f51cba4f39292c..020707bba9c960c155f4257d9a027d6aecdae5b8:/src/msw/settings.cpp diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 633f9bd50c..bad418ac1e 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -249,6 +249,17 @@ wxFont wxCreateFontFromStockObject(int index) wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) { +#ifdef __WXWINCE__ + // under CE only a single SYSTEM_FONT exists + index; + + if ( !gs_fontDefault ) + { + gs_fontDefault = new wxFont(wxCreateFontFromStockObject(SYSTEM_FONT)); + } + + return *gs_fontDefault; +#else // !__WXWINCE__ // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're // called fairly often -- this is why we cache this particular font const bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT; @@ -267,6 +278,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) } return font; +#endif // __WXWINCE__/!__WXWINCE__ } // ----------------------------------------------------------------------------