Commit 28ec8565 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/monthcal: Don't request locale data when it isn't needed.

parent 7bd581e6
......@@ -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;
}
......
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