X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fwindow.cpp;h=00acbc459446a6d410d12d876f4bb7662f4265f0;hb=eba34251cee51134bba7644a84da49583da599f7;hp=166e49f716fc8f63944015360b8806068ff325b6;hpb=1aca77b93853ee127ac3bbf6886f7f04920542ef;p=libs%2Fgui.git diff --git a/source/graphics/window.cpp b/source/graphics/window.cpp index 166e49f..00acbc4 100644 --- a/source/graphics/window.cpp +++ b/source/graphics/window.cpp @@ -62,16 +62,16 @@ void Window::reconfigure(const WindowOptions &opts) bool fullscreen_changed = (opts.fullscreen!=options.fullscreen); resizing = (opts.width!=options.width || opts.height!=options.height); - options = opts; - platform_reconfigure(fullscreen_changed); - if(visible) { - if(options.fullscreen) - display.set_mode(VideoMode(options.width, options.height)); + if(opts.fullscreen) + display.set_mode(VideoMode(opts.width, opts.height)); else if(fullscreen_changed) display.restore_mode(); } + + options = opts; + platform_reconfigure(fullscreen_changed); } void Window::set_keyboard_autorepeat(bool r) @@ -86,7 +86,7 @@ void Window::show() if(options.fullscreen) { - display.set_mode(VideoMode(options.width, options.height)); + display.set_mode(VideoMode(options.width, options.height), true); warp_pointer(options.width/2, options.height/2); } }