Skip to content

Commit

Permalink
[ClientAppliction] Fixed #114. Will be backported to 0.0.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jun 26, 2020
1 parent cc2e0fb commit c5e87c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 4 additions & 2 deletions misc/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
echo -n "Which version are you deploying? "
read version

rm -r deploy/win32/bin/openminer deploy/win64/bin/openminer deploy/linux64/bin/openminer
rm -rf deploy/win32/bin/openminer deploy/win64/bin/openminer deploy/linux64/bin/openminer
mkdir -p deploy/win32/bin/openminer deploy/win64/bin/openminer deploy/linux64/bin/openminer

rm deploy/*.zip
rm -f deploy/*.zip

# Win32
i686-w64-mingw32-cmake -B deploy/win32 . && \
Expand All @@ -17,6 +17,7 @@ cp -r docs mods resources texturepacks deploy/win32/bin/openminer && \
mkdir deploy/win32/bin/openminer/config && \
cp config/*.example.lua deploy/win32/bin/openminer/config && \
cp /usr/i686-w64-mingw32/bin/libwinpthread-1.dll deploy/win32/bin/openminer && \
cp /usr/i686-w64-mingw32/bin/libssp-0.dll deploy/win32/bin/openminer && \
cd deploy/win32/bin && \
zip -T -r ../../OpenMiner-$version-win32.zip openminer &&
cd ../../..
Expand All @@ -30,6 +31,7 @@ cp -r docs mods resources texturepacks deploy/win64/bin/openminer && \
mkdir deploy/win64/bin/openminer/config && \
cp config/*.example.lua deploy/win64/bin/openminer/config && \
cp /usr/x86_64-w64-mingw32/bin/libwinpthread-1.dll deploy/win64/bin/openminer && \
cp /usr/x86_64-w64-mingw32/bin/libssp-0.dll deploy/win64/bin/openminer && \
cd deploy/win64/bin && \
zip -T -r ../../OpenMiner-$version-win64.zip openminer &&
cd ../../..
Expand Down
9 changes: 9 additions & 0 deletions source/client/core/ClientApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ void ClientApplication::handleEvents() {
if ((Config::isFullscreenModeEnabled && !m_window.isFullscreenModeEnabled())
|| (!Config::isFullscreenModeEnabled && m_window.isFullscreenModeEnabled())) {
m_window.setFullscreenMode(Config::isFullscreenModeEnabled);

// FIXME: Required for Windows
sf::Event event;
event.type = sf::Event::Resized;
event.size.width = m_window.window().getSize().x;
event.size.height = m_window.window().getSize().y;
onEvent(event);
}

if (Config::screenWidth != m_window.getSize().x || Config::screenHeight != m_window.getSize().y) {
Expand All @@ -128,6 +135,8 @@ void ClientApplication::handleEvents() {
}

void ClientApplication::onEvent(const sf::Event &event) {
gk::CoreApplication::onEvent(event);

if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::F11)
Config::isFullscreenModeEnabled ^= 1;
}
Expand Down

0 comments on commit c5e87c0

Please sign in to comment.