1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 09:55:06 +00:00

Pass the process to CharacterDevice::read/write.

This is much nicer than grabbing directly at 'current' inside a read().
This commit is contained in:
Andreas Kling 2019-01-16 00:20:38 +01:00
parent 08bfe518f9
commit bd3e77cc16
27 changed files with 63 additions and 62 deletions

View file

@ -78,7 +78,7 @@ void EventLoop::waitForEvent()
int dy = 0;
while (mouse.can_read(*m_server_process)) {
signed_byte data[3];
ssize_t nread = mouse.read((byte*)data, 3);
ssize_t nread = mouse.read(*m_server_process, (byte*)data, 3);
ASSERT(nread == 3);
bool left_button = data[0] & 1;
bool right_button = data[0] & 2;