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

When graphics cannot be initialized apply fallback #331

Open
stefanhendriks opened this issue Sep 22, 2021 · 4 comments
Open

When graphics cannot be initialized apply fallback #331

stefanhendriks opened this issue Sep 22, 2021 · 4 comments
Labels
improvement Quality of life or general improvement of a game mechanic

Comments

@stefanhendriks
Copy link
Owner

stefanhendriks commented Sep 22, 2021

From #330 and #536

Case that still remains:

  • when windowed mode, and resolution cannot be acquired, the game exits. Instead, it should try different resolutions.

What about:

  • if all else fails, try 800x600 (windowed OR fullscreen), and only if that fails abort game?
@pbomta
Copy link
Collaborator

pbomta commented Feb 3, 2022

With the current implementation (that was already there before I refactored it into cScreenInit), it falls-back to autodetection when fullscreen init was not possible with the vars from game.ini. That would also solve this, right? I tested it. The logs show:

133|INFO|ALLEGRO|Desktop color dept is 32.|Screen init
133|INFO|ALLEGRO|Fullscreen mode requested.|Screen init
525|WARN|ALLEGRO|Failed to initialize full-screen with resolution 1234x600 and color depth 32.|FAILED|Screen init
580|INFO|ALLEGRO|Trying to init full-screen at 1920x1080.|Screen init
656|INFO|ALLEGRO|Successfully initialized full-screen with resolution 1920x1080 and color depth 32.|SUCCESS|Screen init

@stefanhendriks-felyx
Copy link

Hmm, well somehow it failed with that code. So I am unsure if it really worked.

One way to test this is to set the screen width/height to a resolution greater than the screen and see it fall back.

If that works, then I think we solved this part? (we still need to fix this DPI thing though).

@stefanhendriks-felyx
Copy link

I am not sure if this comment: #330 (comment) was using the same screen detection code, thats why I'm in doubt.

@stefanhendriks
Copy link
Owner Author

With #536 we've found another case. So this is not entirely fixed.

@stefanhendriks stefanhendriks changed the title When graphics cannot be initialized with vars from game.ini try 800x600 as fallback When graphics cannot be initialized apply fallback Apr 29, 2022
@stefanhendriks stefanhendriks added the improvement Quality of life or general improvement of a game mechanic label Apr 29, 2022
@stefanhendriks stefanhendriks moved this to Backlog in D2TM May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Quality of life or general improvement of a game mechanic
Projects
Status: Backlog
Development

No branches or pull requests

3 participants