reg: Display the default value name when ask_confirm() is passed "" for reg_info.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
81a030b934
commit
8220a32e0a
|
@ -151,6 +151,7 @@ static BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info)
|
||||||
WCHAR Nbuffer[4];
|
WCHAR Nbuffer[4];
|
||||||
WCHAR defval[32];
|
WCHAR defval[32];
|
||||||
WCHAR answer[MAX_PATH];
|
WCHAR answer[MAX_PATH];
|
||||||
|
WCHAR *str;
|
||||||
DWORD count;
|
DWORD count;
|
||||||
|
|
||||||
hmod = GetModuleHandleW(NULL);
|
hmod = GetModuleHandleW(NULL);
|
||||||
|
@ -158,9 +159,11 @@ static BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info)
|
||||||
LoadStringW(hmod, STRING_NO, Nbuffer, ARRAY_SIZE(Nbuffer));
|
LoadStringW(hmod, STRING_NO, Nbuffer, ARRAY_SIZE(Nbuffer));
|
||||||
LoadStringW(hmod, STRING_DEFAULT_VALUE, defval, ARRAY_SIZE(defval));
|
LoadStringW(hmod, STRING_DEFAULT_VALUE, defval, ARRAY_SIZE(defval));
|
||||||
|
|
||||||
|
str = (reg_info && strlenW(reg_info)) ? reg_info : defval;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
output_message(msgid, reg_info ? reg_info : defval);
|
output_message(msgid, str);
|
||||||
output_message(STRING_YESNO);
|
output_message(STRING_YESNO);
|
||||||
ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), answer, ARRAY_SIZE(answer), &count, NULL);
|
ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), answer, ARRAY_SIZE(answer), &count, NULL);
|
||||||
answer[0] = toupperW(answer[0]);
|
answer[0] = toupperW(answer[0]);
|
||||||
|
|
Loading…
Reference in New Issue