Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numerical keys do not working to build rail or road segments on Linux FC8, e->we.keypress.keycode==0 #2277

Closed
DorpsGek opened this issue Sep 7, 2008 · 1 comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Sep 7, 2008

xbayer opened the ticket and wrote:

Hello,

I'm using Linux OS Fedora Core 8, I've just downloaded a new version of OpenTDD and compiled. Everything is OK, but I'm not able to use keys from '1' to '9' to build the corresponding rail or road segments. The version of OpenTTD is 0.6.2 2008-08-01.

If I pres the key, nothing happens, I have tried to look into the code and I have determined, that in the file src/rail_gui.cpp on the row 568
e->we.keypress.keycode
is 0 if I press '1' or '2' ... and so on, but if I try to press another key, keyccode is OK.

but e->we.keypress.key is set correctly and i would like to play ;-), so I have tried to add something like:
|| (!e->we.keypress.keycode && e->we.keypress.key == _rail_keycodes[i])

and now I have
if (e->we.keypress.keycode == _rail_keycodes[i] || (!e->we.keypress.keycode && e->we.keypress.key == _rail_keycodes[i])) {
on the row 568 in src/rail_gui.cpp and it is working correctly. Similarly I have changed src/road.cpp on the row 486
and switch in src/dock_gui.cpp on the row 145.

It is a hack, I know, maybe somewhere in src/window.cpp about the row 1660... is the real problem, maybe not ;-) Meybe problem can be in the wrong determination of unicode...??? The earlier version 0.5.3. was working correctly.

Please, can you repair it?

Thank you for the OpenTTD, It's one of the best game of the world!!!

Have a nice day, if you have questions, please contact me via jaroslav.bayer@gmail.com

Jaroslav Bayer

Reported version: 0.6.2
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/2277
@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 7, 2008

Rubidium closed the ticket.

Reason for closing: Fixed

In r14260.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2277

@DorpsGek DorpsGek closed this as completed Sep 7, 2008
@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant