Vinatorul/minesweeper-rs

Game fails to start on armv7 Linux

MagaTailor opened this issue · 9 comments

The game builds fine on this Odroid C1.

Running the game however presents a problem. If I try using mesa I get this:

[glutin] x error code=51 major=0 minor=0!
[glutin] x error code=69 major=0 minor=0!
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: "GL context creation failed"', ../src/libcore/result.rs:734

Whereas trying to use /ptitSeb/glshim leads to this:

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: "Couldn\'t find any pixel format that matches the criterias."', ../src/libcore/result.rs:734

I'm getting the same result at either 16 or 32 bpp.
I've just noticed a similiar issue in the 'rocket' project where it was down to requiring OpenGL 3 / or 8x antialiasing.

Running with --oldOGL helped but why not use v2 from the start? It's a very simple game after all...

Thank you for report, I have set OpenGL to V3 by default because of it is default to piston. May be you are right, I'll think about it.

xilec commented

May be will it be better to do some config file for such purposes (like config.ini)?

For an absolutely least amount of work I'd suggest adding a line that would get printed on startup failure saying:

"maybe you should try running with --oldOGL"

Otherwise it will still require manual editing so short of runtime detection it won't make a big difference.

While we can't catch panics on stable rust - we will be unable to handle this problem.
However if you have any suggestions - let me know.

In that case something like "run with --help for possible switches" could be printed on every startup just to alert the user there actually are any!

Oh, in case there might be a config file it should get created on successful startup so checking for it might trigger the --oldOGL suggestion.

@petevine creating "last successful" config is nice idea.

While we can't catch panics on stable rust - we will be unable to handle this problem.
However if you have any suggestions - let me know.

Well, there's std::panic::catch_unwind now.