Max OS 0.3
Loading...
Searching...
No Matches
video.cpp
Go to the documentation of this file.
1
8//
9// Created by 98max on 8/04/2023.
10//
11
12#include <drivers/video/video.h>
13
14using namespace MaxOS::drivers::video;
15using namespace MaxOS::common;
16
17VideoDriver::VideoDriver() = default;
18
19VideoDriver::~VideoDriver() = default;
20
32
44
53bool VideoDriver::set_mode(uint32_t width, uint32_t height, uint32_t color_depth) {
54
55 // Cant set it if not supported
57 return false;
58
59 // Try set the mode
61 return false;
62
63 // Store the mode
64 m_width = width;
67 return true;
68}
uint32_t m_color_depth
The color depth of the screen in bits per pixel.
uint32_t width() const
Gets the width of the screen.
uint32_t height() const
Gets the height of the screen.
uint32_t m_width
The width of the screen in pixels.
uint32_t color_depth() const
Gets the current color depth (bits per pixel)
uint32_t m_height
The height of the screen in pixels.
Stores the left, top, width and height of a rectangle.
Definition rectangle.h:22
virtual bool internal_set_mode(uint32_t width, uint32_t height, uint32_t color_depth)
Set the mode of the video driver.
Definition video.cpp:29
bool set_mode(uint32_t width, uint32_t height, uint32_t color_depth)
Set the mode of the video driver.
Definition video.cpp:53
virtual bool supports_mode(uint32_t width, uint32_t height, uint32_t color_depth)
Check if the video driver supports a certain mode.
Definition video.cpp:41
Defines a generic VideoDriver class for handling video modes and graphics context operations.