Jacek Caban : kernel32: Use IOCTL_CONDRV_GET_INPUT_INFO in CONSOLE_GetEditionMode.

Alexandre Julliard julliard at winehq.org
Tue Jul 7 15:47:07 CDT 2020


Module: wine
Branch: master
Commit: d04baa29e296599f3736ab9bd7c830451eb3335d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d04baa29e296599f3736ab9bd7c830451eb3335d

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Jul  7 16:07:15 2020 +0200

kernel32: Use IOCTL_CONDRV_GET_INPUT_INFO in CONSOLE_GetEditionMode.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/console.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index b1fc231c77..e919fcf3f1 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -1077,15 +1077,9 @@ unsigned CONSOLE_GetNumHistoryEntries(void)
  */
 BOOL CONSOLE_GetEditionMode(HANDLE hConIn, int* mode)
 {
-    unsigned ret = 0;
-    SERVER_START_REQ(get_console_input_info)
-    {
-        req->handle = console_handle_unmap(hConIn);
-        if ((ret = !wine_server_call_err( req )))
-            *mode = reply->edition_mode;
-    }
-    SERVER_END_REQ;
-    return ret;
+    struct condrv_input_info info;
+    return DeviceIoControl( hConIn, IOCTL_CONDRV_GET_INPUT_INFO, NULL, 0, &info, sizeof(info), NULL, NULL )
+        ? info.edition_mode : 0;
 }
 
 /******************************************************************




More information about the wine-cvs mailing list