if(opts.x!=options.x || opts.y!=options.y)
moving = true;
+ options = opts;
+
if(visible)
{
- if(opts.fullscreen)
- display.set_mode(VideoMode(opts.width, opts.height));
+ if(options.fullscreen)
+ set_fullscreen_mode();
else if(fullscreen_changed)
display.restore_mode();
}
- options = opts;
platform_reconfigure(fullscreen_changed);
}
+void Window::set_fullscreen_mode()
+{
+ VideoMode mode(options.width, options.height);
+ mode.rotation = display.get_desktop_mode().monitor->desktop_rotation;
+ if(mode.rotation==ROTATE_LEFT || mode.rotation==ROTATE_RIGHT)
+ swap(mode.width, mode.height);
+ display.set_mode(mode, true);
+}
+
void Window::set_keyboard_autorepeat(bool r)
{
kbd_autorepeat = r;
if(options.fullscreen)
{
- display.set_mode(VideoMode(options.width, options.height), true);
+ set_fullscreen_mode();
warp_pointer(options.width/2, options.height/2);
}
}
void set_title(const std::string &);
void reconfigure(const WindowOptions &);
private:
+ void set_fullscreen_mode();
void platform_reconfigure(bool);
public:
void set_keyboard_autorepeat(bool);