mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Fix for `slow-startup-printer': use PRINTER_INFO_4 on NT-class systems, which
apparently tries less hard to find printers so won't slow the system down. Tested on 2000 and 98; in both cases printer enumeration and printing worked as well as they did in 2003-08-21. Made a single shared copy of osVersion in winmisc.c so that printing.c can find it. Made other users (window.c, pageant.c) use this copy. [originally from svn r3411]
This commit is contained in:
17
window.c
17
window.c
@ -179,8 +179,6 @@ static int compose_state = 0;
|
||||
|
||||
static int wsa_started = 0;
|
||||
|
||||
static OSVERSIONINFO osVersion;
|
||||
|
||||
static UINT wm_mousewheel = WM_MOUSEWHEEL;
|
||||
|
||||
/* Dummy routine, only required in plink. */
|
||||
@ -221,16 +219,13 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
* config box. */
|
||||
defuse_showwindow();
|
||||
|
||||
if (!init_winver())
|
||||
{
|
||||
ZeroMemory(&osVersion, sizeof(osVersion));
|
||||
osVersion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
|
||||
if (!GetVersionEx ( (OSVERSIONINFO *) &osVersion)) {
|
||||
char *str = dupprintf("%s Fatal Error", appname);
|
||||
MessageBox(NULL, "Windows refuses to report a version",
|
||||
str, MB_OK | MB_ICONEXCLAMATION);
|
||||
sfree(str);
|
||||
return 1;
|
||||
}
|
||||
char *str = dupprintf("%s Fatal Error", appname);
|
||||
MessageBox(NULL, "Windows refuses to report a version",
|
||||
str, MB_OK | MB_ICONEXCLAMATION);
|
||||
sfree(str);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user