mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 01:09:25 +00:00
Instead of cowboy-calling the VESA BIOS in the bootloader, find the emulator VGA adapter by scanning the PCI bus. Then set up the desired video mode by sending device commands.
26 lines
683 B
C++
26 lines
683 B
C++
#include "Process.h"
|
|
#include <SharedGraphics/Font.h>
|
|
#include <WindowServer/WSScreen.h>
|
|
#include <WindowServer/WSWindowManager.h>
|
|
#include <WindowServer/WSMessageLoop.h>
|
|
#include <WindowServer/WSWindow.h>
|
|
|
|
// NOTE: This actually runs as a kernel process.
|
|
// I'd like to change this eventually.
|
|
|
|
void WindowServer_main()
|
|
{
|
|
auto info = current->set_video_resolution(1024, 768);
|
|
|
|
dbgprintf("Screen is %ux%ux%ubpp\n", info.width, info.height, info.bpp);
|
|
|
|
WSScreen screen((dword*)info.framebuffer, info.width, info.height);
|
|
|
|
WSWindowManager::the();
|
|
|
|
dbgprintf("Entering WindowServer main loop.\n");
|
|
WSMessageLoop::the().exec();
|
|
|
|
ASSERT_NOT_REACHED();
|
|
}
|