1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

WindowServer: Move video mode setup to WSScreen.

This commit is contained in:
Andreas Kling 2019-02-17 01:43:01 +01:00
parent 809266a9fb
commit 82768e7ac5
6 changed files with 47 additions and 58 deletions

View file

@ -11,7 +11,6 @@
#include "WSMenuBar.h"
#include "WSMenuItem.h"
#include <WindowServer/WSClientConnection.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdio.h>
#include <time.h>
@ -128,11 +127,8 @@ void WSWindowManager::flip_buffers()
{
swap(m_front_bitmap, m_back_bitmap);
swap(m_front_painter, m_back_painter);
if (m_framebuffer_fd != -1) {
int new_y_offset = m_buffers_are_flipped ? 0 : m_screen_rect.height();
int rc = ioctl(m_framebuffer_fd, 1982, new_y_offset);
ASSERT(rc == 0);
}
int new_y_offset = m_buffers_are_flipped ? 0 : m_screen_rect.height();
WSScreen::the().set_y_offset(new_y_offset);
m_buffers_are_flipped = !m_buffers_are_flipped;
}