summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-07-15 08:21:06 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-07-15 08:21:06 +0000
commit13cb522b404a97172255df898d7674fe6b16cedd (patch)
treeb9cd647a456349984ea038e9b172bff24b7bd5f4 /src/gui
parentc44f66d94c9a26e2a13e59334abe18c63f925b74 (diff)
downloadmana-13cb522b404a97172255df898d7674fe6b16cedd.tar.gz
mana-13cb522b404a97172255df898d7674fe6b16cedd.tar.bz2
mana-13cb522b404a97172255df898d7674fe6b16cedd.tar.xz
mana-13cb522b404a97172255df898d7674fe6b16cedd.zip
Enabling support for joypads:
- Only <=6 buttons are supported - Only the first jopad is used (if you have more than one) - Axes need to be tuned - You can only move and attack with joypad Small fix in the updating system
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/updatewindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 73efc102..42a68afa 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -158,6 +158,10 @@ int updateProgress(void *ptr,
{
std::string labelString(currentFile);
float progress = d/t;
+ if (d < 0)
+ {
+ d = 0.0f;
+ }
std::stringstream progressString("");
progressString << ((int)(progress*100));
labelString += " (" + progressString.str() + "%)";