From: Helge Norberg Date: Wed, 29 Mar 2017 16:34:22 +0000 (+0200) Subject: [screen_consumer] #495 Fixed full screen mode X-Git-Tag: 2.1.0_Beta2~28 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f448ec11e7f03bd25d9e578ba95a921edbad20e1;hp=6282c2d84243e5233aef26ae909392c85d7605ff;p=casparcg [screen_consumer] #495 Fixed full screen mode --- diff --git a/CHANGELOG b/CHANGELOG index c90fce6e9..7ca45d699 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -49,6 +49,8 @@ Consumers o Bluefish consumer: + Largely rewritten against newest SDK, giving support for newer hardware and features (Satchit Nambiar and James Wise sponsored by Bluefish444). + o Screen consumer: + + Fixed full screen mode. Producers --------- diff --git a/modules/screen/consumer/screen_consumer.cpp b/modules/screen/consumer/screen_consumer.cpp index b992cfb69..818bdf12e 100644 --- a/modules/screen/consumer/screen_consumer.cpp +++ b/modules/screen/consumer/screen_consumer.cpp @@ -241,10 +241,20 @@ public: : (config_.windowed ? sf::Style::Resize | sf::Style::Close : sf::Style::Fullscreen); - window_.create(sf::VideoMode(screen_width_, screen_height_, 32), u8(print()), window_style); + window_.create(sf::VideoMode::getDesktopMode(), u8(print()), window_style); + + if (config_.windowed) + { + window_.setPosition(sf::Vector2i(screen_x_, screen_y_)); + window_.setSize(sf::Vector2u(screen_width_, screen_height_)); + } + else + { + screen_width_ = window_.getSize().x; + screen_height_ = window_.getSize().y; + } + window_.setMouseCursorVisible(config_.interactive); - window_.setPosition(sf::Vector2i(screen_x_, screen_y_)); - window_.setSize(sf::Vector2u(screen_width_, screen_height_)); window_.setActive(); if(!GLEW_VERSION_2_1 && glewInit() != GLEW_OK)