Bug 268581 - Rotation keys reversed in Kblocks 0.3
Summary: Rotation keys reversed in Kblocks 0.3
Status: RESOLVED FIXED
Alias: None
Product: kblocks
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Zhongjie Cai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 20:34 UTC by Jesper Goll
Modified: 2011-03-16 20:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Goll 2011-03-15 20:34:34 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

Rotation (clockwise and anti-clockwise) now works in reverse. I.e., in order
to make the 'Up' key do an anti-clockwise rotation you must now set it to
'clockwise'.

Reproducible: Always

Steps to Reproduce:
Install OpenSuse 11.4 with KDE 4.6 (and with KBlocks 0.3), then play KBlocks. I did it in single-player mode.

Actual Results:  
Rotation keys work in the opposite direction from what they used to - and from what they should be doing according to their shortcut settings.

Expected Results:  
The rotation keys ought not to be reversed.

This bug supersedes bug 268528, part 2 - as it would appear that combined bug reports are unhandy in the bug tracking process.
Comment 1 Frederik Schwarzer 2011-03-16 14:56:36 UTC
I can confirm the issue.

After a short look at the code, I came up with this patch (really, a short look, and I am not able to compile currently, so could anyone test this please?)

Index: KBlocksKeyboardPlayer.cpp
===================================================================
--- KBlocksKeyboardPlayer.cpp   (revision 1225051)
+++ KBlocksKeyboardPlayer.cpp   (working copy)
@@ -196,7 +196,7 @@
     }
     else
     {
-        mpGame->setCurrentPiece(0, 0, 1);
+        mpGame->setCurrentPiece(0, 0, -1);
     }
 }
 
@@ -212,6 +212,6 @@
     }
     else
     {
-        mpGame->setCurrentPiece(0, 0, -1);
+        mpGame->setCurrentPiece(0, 0, 1);
     }
 }
Comment 2 Zhongjie Cai 2011-03-16 16:09:41 UTC
It'll do. Anyone could test it.
Comment 3 Frederik Schwarzer 2011-03-16 20:17:31 UTC
Ok, tested on another box and it works. :)
Comment 4 Frederik Schwarzer 2011-03-16 20:18:29 UTC
SVN commit 1225074 by schwarzer:

Fix swapped rotation direction.

BUG: 268581

 M  +2 -2      KBlocksKeyboardPlayer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225074
Comment 5 Frederik Schwarzer 2011-03-16 20:24:46 UTC
SVN commit 1225076 by schwarzer:

Fix swapped rotation direction.

BUG: 268581

 M  +2 -2      KBlocksKeyboardPlayer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225076