1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Windows: diagnose failure to create the terminal window.

It only fails in very unusual circumstances, but that's all the more
reason to give a useful report when it does!
This commit is contained in:
Simon Tatham 2022-03-11 19:11:35 +00:00
parent cf41bc0c62
commit fe00a2928c

View File

@ -575,6 +575,10 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
wgs.term_hwnd = CreateWindowExW(
exwinmode, uappname, uappname, winmode, CW_USEDEFAULT,
CW_USEDEFAULT, guess_width, guess_height, NULL, NULL, inst, NULL);
if (!wgs.term_hwnd) {
modalfatalbox("Unable to create terminal window: %s",
win_strerror(GetLastError()));
}
memset(&dpi_info, 0, sizeof(struct _dpi_info));
init_dpi_info();
sfree(uappname);