Sunday, August 29, 2010

Left-handed mouse support for "Seven Kingdoms: Ancient Adversaries" game on linux

Recently I’ve come upon the linux port of open-source 7kaa strategy game. Unfortunately, the game launches in fullscreen and ignores Xorg configuration settings.

Such as mouse button mapping. I use a left-handed mouse and prefer left and right button to be swapped. It is easy to achieve in X Windows, but I’ve found no obvious way to set button swapping configuration for the 7kaa game. I found it annoying to play the game with left and right mouse button set to the reverse of what I’d got used to.

It was easy enough to get the result through source code modification. The patch for linux version 2.14.0 of the "7 Kingdoms: Ancient adversaries” game could be downloaded here.

The patch should be copied to the source code directory of the game. And the following command applies the patch to the source:

patch –p1 < 7kaa-2.14.0-lefthanded-mouse.patch
The source should be then configured and recompiled according to the instructions in the README file. The compiled binary changes left and right mouse buttons behavior. Voilà!

No comments:

Post a Comment