X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgraphics%2Fdisplay.cpp;h=de5a06952a58e8efa8f3e956ee0f949126775426;hb=e5dd55567618c0a0789d25882d2e0eab69437d63;hp=22dd705df90c772e6901ae30f618f87db787077a;hpb=89ec4c335953556ca069960adf6ea3a5dc3bb499;p=libs%2Fgui.git diff --git a/source/graphics/display.cpp b/source/graphics/display.cpp index 22dd705..de5a069 100644 --- a/source/graphics/display.cpp +++ b/source/graphics/display.cpp @@ -31,7 +31,7 @@ void Display::restore_mode() set_mode(*i->desktop_mode, false); } -const VideoMode *Display::find_matching_mode(const VideoMode &mode) const +const VideoMode *Display::find_mode(const VideoMode &mode) const { for(list::const_iterator i=modes.begin(); i!=modes.end(); ++i) { @@ -46,6 +46,11 @@ const VideoMode *Display::find_matching_mode(const VideoMode &mode) const return 0; } +const VideoMode *Display::find_mode(unsigned width, unsigned height) const +{ + return find_mode(VideoMode(width, height)); +} + void Display::tick() { check_error();