Jacek Caban : server: Allow using console ioctls on renderer object.

Alexandre Julliard julliard at winehq.org
Wed Jul 29 15:47:00 CDT 2020


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jul 29 12:37:12 2020 +0200

server: Allow using console ioctls on renderer object.

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

---

 server/console.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/server/console.c b/server/console.c
index 7a10b611c5..add8b1278d 100644
--- a/server/console.c
+++ b/server/console.c
@@ -1910,9 +1910,27 @@ static int console_input_events_ioctl( struct fd *fd, ioctl_code_t code, struct
             return !get_error();
         }
 
+    case IOCTL_CONDRV_SCROLL:
+    case IOCTL_CONDRV_SET_MODE:
+    case IOCTL_CONDRV_WRITE_OUTPUT:
+    case IOCTL_CONDRV_READ_OUTPUT:
+    case IOCTL_CONDRV_FILL_OUTPUT:
+    case IOCTL_CONDRV_GET_OUTPUT_INFO:
+    case IOCTL_CONDRV_SET_OUTPUT_INFO:
+        if (!evts->console || !evts->console->active)
+        {
+            set_error( STATUS_INVALID_HANDLE );
+            return 0;
+        }
+        return screen_buffer_ioctl( evts->console->active->fd, code, async );
+
     default:
-        set_error( STATUS_INVALID_HANDLE );
-        return 0;
+        if (!evts->console)
+        {
+            set_error( STATUS_INVALID_HANDLE );
+            return 0;
+        }
+        return console_input_ioctl( evts->console->fd, code, async );
     }
 }
 




More information about the wine-cvs mailing list