mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
WindowServer: Print the error when failing to open /dev/fb0
This commit is contained in:
parent
862b3ccb4e
commit
88f5991c29
1 changed files with 5 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
||||||
#include "WSWindowManager.h"
|
#include "WSWindowManager.h"
|
||||||
#include <Kernel/FB.h>
|
#include <Kernel/FB.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -47,7 +48,10 @@ WSScreen::WSScreen(unsigned desired_width, unsigned desired_height)
|
||||||
ASSERT(!s_the);
|
ASSERT(!s_the);
|
||||||
s_the = this;
|
s_the = this;
|
||||||
m_framebuffer_fd = open("/dev/fb0", O_RDWR | O_CLOEXEC);
|
m_framebuffer_fd = open("/dev/fb0", O_RDWR | O_CLOEXEC);
|
||||||
ASSERT(m_framebuffer_fd >= 0);
|
if (m_framebuffer_fd < 0) {
|
||||||
|
perror("failed to open /dev/fb0");
|
||||||
|
ASSERT_NOT_REACHED();
|
||||||
|
}
|
||||||
|
|
||||||
if (fb_set_buffer(m_framebuffer_fd, 0) == 0) {
|
if (fb_set_buffer(m_framebuffer_fd, 0) == 0) {
|
||||||
m_can_set_buffer = true;
|
m_can_set_buffer = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue