X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fwindow.cpp;h=d27f41fd6fda9980cbf9192329335388e918d8c0;hb=207eec91afc6b538753ddc44905ac9ddbc907ac0;hp=073cd8d5c819311277bfeb6e0ff0444521a4eeb9;hpb=787d1982dceae67b9b934a9b74e08a096c0c1830;p=libs%2Fgui.git diff --git a/source/graphics/window.cpp b/source/graphics/window.cpp index 073cd8d..d27f41f 100644 --- a/source/graphics/window.cpp +++ b/source/graphics/window.cpp @@ -15,6 +15,8 @@ WindowOptions::WindowOptions(): width(640), height(480), fullscreen(false), + fullscreen_monitor(0), + fullscreen_exclusive(true), resizable(false) { } @@ -90,11 +92,14 @@ void Window::reconfigure(const WindowOptions &opts) void Window::set_fullscreen_mode() { + if(!options.fullscreen_monitor) + options.fullscreen_monitor = display.get_desktop_mode().monitor; VideoMode mode(options.width, options.height); - mode.rotation = display.get_desktop_mode().monitor->desktop_rotation; + mode.monitor = options.fullscreen_monitor; + mode.rotation = mode.monitor->desktop_settings.rotation; if(mode.rotation==ROTATE_LEFT || mode.rotation==ROTATE_RIGHT) swap(mode.width, mode.height); - display.set_mode(mode, true); + display.set_mode(mode, options.fullscreen_exclusive); } void Window::set_keyboard_autorepeat(bool r)