Emulate rightclick on OpenTTD
In the original version of OTTD the right click is emulated by holding the ctrl key. Rightclick emulation can be enabled in the openttd.cfg file, by setting under the [misc] section,
But the ctrl key is already mapped to othe things in the game (shared orderes for example). A very small modification to the code changes the key to shift. In /src/video/sdl_v.cpp change (line 387):rightclick_emulate = true
toif (_rightclick_emulate && SDL_CALL SDL_GetModState() & KMOD_CTRL) {
if (_rightclick_emulate && SDL_CALL SDL_GetModState() & KMOD_SHIFT) {
or apply this patch file, by issuing,
Then follow this post, or this one to compile. I've compiled ottd both with my shift patch and the original version.patch -p1 -i right_click_emulate.diff
No comments:
Post a Comment