mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Print out new video mode when current mode is rejected
This commit is contained in:
parent
a474654ea7
commit
329e40019a
@ -94,6 +94,8 @@ void Window::create(VideoMode mode, const String& title, std::uint32_t style, co
|
|||||||
err() << "The requested video mode is not available, switching to a valid mode" << std::endl;
|
err() << "The requested video mode is not available, switching to a valid mode" << std::endl;
|
||||||
assert(!VideoMode::getFullscreenModes().empty() && "No video modes available");
|
assert(!VideoMode::getFullscreenModes().empty() && "No video modes available");
|
||||||
mode = VideoMode::getFullscreenModes()[0];
|
mode = VideoMode::getFullscreenModes()[0];
|
||||||
|
err() << " VideoMode: { size: { " << mode.size.x << ", " << mode.size.y
|
||||||
|
<< " }, bitsPerPixel: " << mode.bitsPerPixel << " }" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the fullscreen window
|
// Update the fullscreen window
|
||||||
|
@ -96,7 +96,10 @@ void WindowBase::create(VideoMode mode, const String& title, std::uint32_t style
|
|||||||
if (!mode.isValid())
|
if (!mode.isValid())
|
||||||
{
|
{
|
||||||
err() << "The requested video mode is not available, switching to a valid mode" << std::endl;
|
err() << "The requested video mode is not available, switching to a valid mode" << std::endl;
|
||||||
|
assert(!VideoMode::getFullscreenModes().empty() && "No video modes available");
|
||||||
mode = VideoMode::getFullscreenModes()[0];
|
mode = VideoMode::getFullscreenModes()[0];
|
||||||
|
err() << " VideoMode: { size: { " << mode.size.x << ", " << mode.size.y
|
||||||
|
<< " }, bitsPerPixel: " << mode.bitsPerPixel << " }" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the fullscreen window
|
// Update the fullscreen window
|
||||||
|
Loading…
Reference in New Issue
Block a user