Vinatorul / minesweeper-rs

Simple minesweeper in Rust
MIT License
76 stars 9 forks source link

Game fails to start on armv7 Linux #32

Closed MagaTailor closed 8 years ago

MagaTailor commented 9 years ago

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.

MagaTailor commented 9 years ago

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

Vinatorul commented 9 years ago

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 9 years ago

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

MagaTailor commented 9 years ago

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.

Vinatorul commented 9 years ago

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.

MagaTailor commented 9 years ago

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!

MagaTailor commented 9 years ago

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.

Vinatorul commented 9 years ago

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

kotauskas commented 4 years ago

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.