[PATCH 2/6] Don't request locale data when it isn't needed
Nikolay Sivov
bunglehead at gmail.com
Thu Oct 1 12:52:16 CDT 2009
---
dlls/comctl32/monthcal.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 71e477e..16d3dcf 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -877,18 +877,19 @@ static LRESULT
MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day)
{
int prev = MAKELONG(infoPtr->firstDay, infoPtr->firstDayHighWord);
- int localFirstDay;
- WCHAR buf[40];
TRACE("day %d\n", day);
- GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK, buf, countof(buf));
- TRACE("%s %d\n", debugstr_w(buf), strlenW(buf));
-
- localFirstDay = atoiW(buf);
-
if(day == -1)
{
+ int localFirstDay;
+ WCHAR buf[80];
+
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK, buf, countof(buf));
+ TRACE("%s %d\n", debugstr_w(buf), strlenW(buf));
+
+ localFirstDay = atoiW(buf);
+
infoPtr->firstDay = localFirstDay;
infoPtr->firstDayHighWord = FALSE;
}
--
1.5.6.5
--=-qxmyyCnhmPuP3EWHVcXm--
More information about the wine-patches
mailing list