Pages: [1]
  Print  
Author Topic: [SOLVED] Swap mouse buttons  (Read 12165 times)
M4d_8utch3r
Nub


Cakes 0
Posts: 9



« on: February 11, 2014, 09:10:42 AM »

Hello everyone!

First post here :-)
I'm left-handed and have swapped my mouse buttons in my OS (Arch Linux, Gnome-Shell). Openarena does not respect these settings.
That's no problem during a match (i just bind them the right way), but in the menu it's quite annoying.

Is there any way to make openarena respect the settings from the OS or a way to bind MOUSE2 to act as ENTER?

Thanx in advance!
« Last Edit: February 11, 2014, 05:02:19 PM by M4d_8utch3r » Logged
Akom74
Member


Cakes 9
Posts: 906


Q3A/OA Mapper


WWW
« Reply #1 on: February 11, 2014, 09:31:18 AM »

Maybe you have to modify the "config.cfg" ?
(you can do this opening it with notepad or another text editor)

 Wink
Logged

...sorry for my English, i'm Italian... Tongue



M4d_8utch3r
Nub


Cakes 0
Posts: 9



« Reply #2 on: February 11, 2014, 09:34:19 AM »

Thanks for the reply!
That's what I meant with 'bind'.
I already use a custom-config for my client and my lan-server.

I'm looking for a way to actually configure this.
Logged
stigmha
Nub


Cakes 0
Posts: 24


Bit by bit


WWW
« Reply #3 on: February 11, 2014, 12:02:42 PM »

The available engine is fetching input through SDL 1.2.14 and it should honestly be SDL that takes account for OS specific input configurations. SDL 1.2 is however quite old so I recommend you clone and build Hairball's SDL-2 branch with the latest libraries and patches from the base ioquake3. It might be fixed there.

Let us know if you need help building the libraries, but I'm currently not doing it to save time in case you are able to do it yourself.

FYI: there's a branch with SDL 1.2.15 as well, but the update doesn't seem to have addressed your issue: http://www.libsdl.org/release/changes-1.2.html
Logged
M4d_8utch3r
Nub


Cakes 0
Posts: 9



« Reply #4 on: February 11, 2014, 02:17:15 PM »

Thanks for your help!

I've installed SDL 2.0.1.
But I don't really understand what you mean with

with the latest libraries and patches from the base ioquake3. It might be fixed there.

I'm definately not an expert when it comes to compiling code. I've checked the makefiles of openarena and ioquake3 and in booth I've only found lines about sdl or SDL12.

It might be fixed there.

Is there a way to KNOW if it's fixed there? Or if it's a matter of time and the fix will come with an update anyway? Would be nice to know before going through all the trouble...
Logged
stigmha
Nub


Cakes 0
Posts: 24


Bit by bit


WWW
« Reply #5 on: February 11, 2014, 02:24:58 PM »

I have compiled the SDL2 version for you, just unzip the following file and copy it over in your OpenArena install directory: http://everythingismyfault.com/archive/oa_sdl2_experimental.7z. It can be a good idea to back up the 2-3 files that will be overwritten.

Is there a way to KNOW if it's fixed there? Or if it's a matter of time and the fix will come with an update anyway? Would be nice to know before going through all the trouble...

I don't know if it will actually work, but I do know that SDL2 is much newer and more compatible with modern software, including recent version of Windows and their APIs. I know it has fixed similar OS specific issues for others.

I want you to try the files and let us know whether they work or not. If not, we can file a request for it to the SDL developers.
Logged
M4d_8utch3r
Nub


Cakes 0
Posts: 9



« Reply #6 on: February 11, 2014, 02:46:50 PM »

Thank you very much!

Are you sure those are the files I need? I run on Linux...
Logged
stigmha
Nub


Cakes 0
Posts: 24


Bit by bit


WWW
« Reply #7 on: February 11, 2014, 03:18:36 PM »

Lol, sorry no, my bad.  Rest In PEACE! I will provide you the Linux files asap.

UPDATE 2014.02.11 22:35 CET

Taking more time than expected as cross-compile fails on Windows -> working on booting my virtual linux system now.

UPDATE 2014.02.11 23:11 CET

... which didn't work as my virtual Linux Mint is totally broken. Try this in a terminal:

Code:
# Install SDL on Arch
pacman -S sdl2
# Install Git if not already installed
pacman -S git
# Clone Hairball's repo
git clone https://github.com/OpenArena/engine.git oa_engine_sdl2_experimental
# ... wait for it to complete
cd oa_engine_sdl2_experimental

# Switch to the SDL2 branch
git fetch
git checkout -b experimental/latest-libraries-sdl2 origin/experimental/latest-libraries-sdl2
git pull

# Build
make
# ... wait for it to complete

The compiled binaries will reside within the oa_engine_sdl2_experimental/release-linux-x86_64/ directory. Replace oa_ded.x86_64 and openarena.x86_64 with the files in the installed OpenArena directory and copy over openarena_opengl1.x86_64 to the same place.

----

I can look at it again tomorrow if you have any more issues making it run. I'll have access to a better Linux machine then.
« Last Edit: February 11, 2014, 04:11:35 PM by stigmha » Logged
grey matter
Member


Cakes 8
Posts: 381

>9k


« Reply #8 on: February 11, 2014, 04:38:26 PM »

I'm not sure whether SDL2 will fix this, since afaik ioq3 just grabs inputs as "mouse1", "mouse2", etc. which won't be swapped because you told your DE that you want to use "mouse1" as right click from now on.
While you can remap the fire/zoom binds in-game, I'm afraid the q3_ui will still react to K_MOUSE1 since it's hardcoded into ui_qmenu.c and others.

That being said, you might want to try a recent ioq3+sdl12 angst build.
« Last Edit: February 11, 2014, 04:41:43 PM by grey matter » Logged

This space is for rent.
M4d_8utch3r
Nub


Cakes 0
Posts: 9



« Reply #9 on: February 11, 2014, 05:00:35 PM »

Try this in a terminal:

Thank you very, very much!
That worked flawlessly! Not only was I able to compile it, but it also recognises my swapped mouse buttons now!  Cool

stigmha, you were more than helpful!
Logged
stigmha
Nub


Cakes 0
Posts: 24


Bit by bit


WWW
« Reply #10 on: February 12, 2014, 03:16:49 AM »

I'm not sure whether SDL2 will fix this, since afaik ioq3 just grabs inputs as "mouse1", "mouse2", etc. which won't be swapped because you told your DE that you want to use "mouse1" as right click from now on.

The SDL<->OS mapping should take care of this so that the right click (mouse2) is automatically converted into left click (mouse1). SDL would be of little use for input if every game would have to make OS specific calls to check for special key mappings - it would totally ruin SDL's main advantage; platform independency. We know now that SDL2 does it while SDL1 does not, but I would guess SDL1 handles it properly for older systems. Smiley

I hope ioquake3 eventually will phase out SDL1.2 and merge the SDL2 branch with their master branch as it seems to have fixed a lot of issues with modern OSes. I think there are more people now that will benefit from the upgrade then the others. SDL1 could still be a separate branch though.

Thank you very, very much!
That worked flawlessly! Not only was I able to compile it, but it also recognises my swapped mouse buttons now!  Cool

Great, I am only happy to help + I came across some new and interesting build issues.  Cheesy

Logged
Pages: [1]
  Print  
 
Jump to: