aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-20 23:16:47 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-20 23:16:50 +0200
commit0fb56002dd2f02ad9d10b1017a221936a194992c (patch)
tree2f72b5237fa1156fe33fb1eac2504040dbcacf27
parent4c392178dac1de9a299beb78989c4e0f3fecade9 (diff)
Update sfml version
-rw-r--r--project.conf6
-rw-r--r--src/Text.cpp1
-rw-r--r--src/main.cpp13
3 files changed, 11 insertions, 9 deletions
diff --git a/project.conf b/project.conf
index cf60d63..09891f7 100644
--- a/project.conf
+++ b/project.conf
@@ -5,9 +5,9 @@ type = "executable"
platforms = ["linux32", "linux64"]
[dependencies]
-sfml-window = "2.4.2"
-sfml-graphics = "2.4.2"
-sfml-system = "2.4.2"
+sfml-window = "2.5"
+sfml-graphics = "2.5"
+sfml-system = "2.5"
boost-filesystem = "1.66.0"
tiny-process = "2.0.0"
mpv = "1.25.0"
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);
}
}