mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
WindowServer: Fallback to safe mode-setting in case of mapping overflow
In case of possible framebuffer mapping overflow, just fallback to the safe mode-setting of the DisplayConnector, because in that state we know for sure that we can map a usable framebuffer (otherwise it is a bug in the Kernel, and not WindowServer).
This commit is contained in:
parent
d5b97eb41e
commit
13e9947b4b
6 changed files with 37 additions and 2 deletions
|
@ -370,12 +370,15 @@ bool Screen::set_resolution(bool initial)
|
|||
if (!return_value.is_error())
|
||||
return true;
|
||||
}
|
||||
if (return_value.is_error()) {
|
||||
if (return_value.is_error() && return_value.error() != Error::from_errno(EOVERFLOW)) {
|
||||
dbgln("Screen #{}: Failed to set resolution {}: {}", index(), info.resolution, return_value.error());
|
||||
MUST(on_change_resolution());
|
||||
return false;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
dbgln("Screen #{}: Failed to set resolution {}: {}, falling back to safe resolution", index(), info.resolution, return_value.error());
|
||||
MUST(m_backend->set_safe_head_mode_setting());
|
||||
MUST(on_change_resolution());
|
||||
return false;
|
||||
}
|
||||
|
||||
void Screen::set_buffer(int index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue