diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-20 23:16:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-05-20 23:16:50 +0200 |
commit | 0fb56002dd2f02ad9d10b1017a221936a194992c (patch) | |
tree | 2f72b5237fa1156fe33fb1eac2504040dbcacf27 /src | |
parent | 4c392178dac1de9a299beb78989c4e0f3fecade9 (diff) |
Update sfml version
Diffstat (limited to 'src')
-rw-r--r-- | src/Text.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Text.cpp b/src/Text.cpp index 3aa1574..2292a4e 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -22,6 +22,7 @@ namespace dchat Text::Text(const sf::Font *_font) : font(_font), characterSize(0), + vertices(sf::PrimitiveType::Quads), maxWidth(0.0f), color(sf::Color::White), urlColor(URL_COLOR), diff --git a/src/main.cpp b/src/main.cpp index a66945c..4440315 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -659,11 +659,11 @@ int main(int argc, char **argv) Channel::getCurrent()->addLocalMessage(msg, Channel::getCurrent()->getSystemUser()); }); - sf::Event event; while (window.isOpen()) { Channel *currentChannel = Channel::getCurrent(); + sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) @@ -695,11 +695,12 @@ int main(int argc, char **argv) if(focused) { ImagePreview::processEvent(event); - if(!ImagePreview::getPreviewContentPtr() && ImagePreview::getTimeSinceLastSeenMs() > 250) - { - GlobalContextMenu::processEvent(event); - currentChannel->processEvent(event, cache); - } + } + + if(!ImagePreview::getPreviewContentPtr() && ImagePreview::getTimeSinceLastSeenMs() > 250) + { + GlobalContextMenu::processEvent(event); + currentChannel->processEvent(event, cache); } } |