@@ -2285,13 +2285,16 @@ static DWORD WINAPI uv__tty_console_resize_message_loop_thread(void* param) {
|
2285 | 2285 | uv__tty_console_width = sb_info.dwSize.X; |
2286 | 2286 | uv__tty_console_height = sb_info.srWindow.Bottom - sb_info.srWindow.Top + 1; |
2287 | 2287 | |
2288 | | -if (!SetWinEventHook(EVENT_CONSOLE_LAYOUT, |
2289 | | -EVENT_CONSOLE_LAYOUT, |
2290 | | -NULL, |
2291 | | -uv__tty_console_resize_event, |
2292 | | -0, |
2293 | | -0, |
2294 | | -WINEVENT_OUTOFCONTEXT)) |
| 2288 | +if (pSetWinEventHook == NULL) |
| 2289 | +return 0; |
| 2290 | + |
| 2291 | +if (!pSetWinEventHook(EVENT_CONSOLE_LAYOUT, |
| 2292 | +EVENT_CONSOLE_LAYOUT, |
| 2293 | +NULL, |
| 2294 | +uv__tty_console_resize_event, |
| 2295 | +0, |
| 2296 | +0, |
| 2297 | +WINEVENT_OUTOFCONTEXT)) |
2295 | 2298 | return 0; |
2296 | 2299 | |
2297 | 2300 | while (GetMessage(&msg, NULL, 0, 0)) { |
|