diff options
-rw-r--r-- | sword1/control.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp index c7437100f9..9297435c19 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -478,7 +478,7 @@ void Control::handleVolumeClicks(void) { uint8 clickDest = 0; int16 mouseDiffX = _mouseX - (_volumeButtons[clickedId].x + 48); int16 mouseDiffY = _mouseY - (_volumeButtons[clickedId].y + 48); - int16 mouseOffs = (int16)sqrt(mouseDiffX * mouseDiffX + mouseDiffY * mouseDiffY); + int16 mouseOffs = (int16)sqrt((double)(mouseDiffX * mouseDiffX + mouseDiffY * mouseDiffY)); // check if the player really hit the button (but not the center). if ((mouseOffs <= 42) && (mouseOffs >= 8)) { if (mouseDiffX > 8) { // right part |