From 99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a Mon Sep 17 00:00:00 2001 From: Chloe Marcec Date: Thu, 25 Mar 2021 12:56:42 +1100 Subject: nvdrv: Pass device fd and handle device create methods for device opening and closing We pass the fd to the ioctl as well as alert the device when it's opened or closed to allow for fd unique actions to take place --- src/core/hle/service/nvdrv/devices/nvdisp_disp0.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/core/hle/service/nvdrv/devices/nvdisp_disp0.h') diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h index 55a33b7e4..59c9b6101 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h @@ -20,11 +20,15 @@ public: explicit nvdisp_disp0(Core::System& system, std::shared_ptr nvmap_dev); ~nvdisp_disp0() override; - NvResult Ioctl1(Ioctl command, const std::vector& input, std::vector& output) override; - NvResult Ioctl2(Ioctl command, const std::vector& input, + NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input, + std::vector& output) override; + NvResult Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input, const std::vector& inline_input, std::vector& output) override; - NvResult Ioctl3(Ioctl command, const std::vector& input, std::vector& output, - std::vector& inline_output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input, + std::vector& output, std::vector& inline_output) override; + + void OnOpen(DeviceFD fd) override; + void OnClose(DeviceFD fd) override; /// Performs a screen flip, drawing the buffer pointed to by the handle. void flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height, u32 stride, -- cgit v1.2.3