cdev-tux / q3lite

Q3lite, an OpenGL ES port of Quake III Arena for embedded Linux systems.
GNU General Public License v3.0
93 stars 16 forks source link

Logging out after quitting game #7

Closed clodsman closed 5 years ago

clodsman commented 6 years ago

Hello

I'm really impressed of the performance of q3lite. But I have one issue, why is the game always logging out after quitting the game. I'm starting the game in the console. How can I fix this issue?

Thanks

cdev-tux commented 6 years ago

Hello,

There’s a bug in the SDL library that leaves the tty console in a corrupt state after the game is run. You can turn off the automatic logout by opening the /usr/local/bin/q3lite file in a text editor and commenting out line 130 by adding a hash mark '#' to the beginning of the line. This is the line that needs to be commented out:

https://github.com/cdev-tux/q3lite/blob/dev/misc/q3lite/pi/q3lite#L130

The file gets overwritten if you reinstall q3lite, so you can make the same modification to the file in the source code directory /misc/q3lite/pi/q3lite to keep from having to make the change again after a reinstall.

It’s been a while since I tested that code, but I believe that commenting the line out will leave the tty console unusable. Let me know how it goes and I can take another look at it.

Thanks

clodsman commented 6 years ago

I unchecked line 130, it didn‘t log me out after quitting the game the console is still working, but no input is shown.

clodsman commented 6 years ago

i just added the command on line 130 stty sane and the input is shown again.

cdev-tux commented 6 years ago

Nice. I’m working on a large commit at the moment, but I’ll test this after it’s done. When the fix is ready I’ll push a commit and give you credit in the Git history. Thank you for looking into this.

clodsman commented 6 years ago

Cool, thanks!

cdev-tux commented 6 years ago

I did some testing and the latest version of the SDL2 libraries doesn’t corrupt the tty console as earlier versions did. So I’ll remove the code that restarts the console and causes the user to log in again. It’ll be necessary to wait until the next major release of the SDL2 libraries (2.0.9) to do this so the entire SDL2 library can be swapped out due to a previous compatibility issue. At that time I’ll remove the console restart code and give you credit in the Git history. I’ll leave this issue open until then as a reminder. Thanks.