Giter Site home page Giter Site logo

Comments (9)

momoko-h avatar momoko-h commented on June 9, 2024

For this to happen, either SDL dislikes the renderer it just created or GameRenderer must be null. The second option seems far more likely, given the lack of proper error checking in InitializeVideoManager(). That would mean SDL cannot create the window or a renderer with the default options for the window it just created.

Do you have any other program that uses SDL and that works in this configuration?

from ja2-stracciatella.

Srandista avatar Srandista commented on June 9, 2024

Alright, I've done some more testing, because I'm aware, that testing on just RPi is really limited.

I tried to run JA2S over VNC on Windows and I found it also doesn't work (although the presentation of an issue is a bit different).

On PC with fully updated Windows 10, I installed TigerVNC server, and then connected from the laptop in same network. JA2S can be run, and if the monitor on PC is on, the game starts without issues and can be seen on laptop, controlled and also played. If however the monitor on PC is off, game seems to start (there is no error message in status window like on RPi), but you can see only white filled window (see attached screenshot). If I turn on monitor then, window start to showing actual game content, and it can be played on laptop without an issue. If I again turn off monitor then, window stop refreshing and it only show last image before the monitor was turned off.

Hopefully this make testing and troubleshooting a bit easier (since RPi might not be required).

TigerVNC_JA2S

from ja2-stracciatella.

momoko-h avatar momoko-h commented on June 9, 2024

Does VNC support OpenGL? What happens if you try to start the game with the environment variable SDL_RENDER_DRIVER set to software, env SDL_RENDER_DRIVER=software ./ja2 ? (Performance will be terrible if that works, but that's expected).

from ja2-stracciatella.

Srandista avatar Srandista commented on June 9, 2024

@momoko-h thanks for a reply. I tried other games on my RPi (with Debian 12 Bookworm), that previously worked (on Debian 11 Bullseye) I'm getting errors in them as well.

Vanilla-Conquer (source port of C&C1) have similar status window like Stracciatella, and it it shows following error:

ERROR: SDL_CreateWindow failed: No available displays
DEBUG: C&C95 - Failed to set video mode.

DevilutionX (source port of Diablo 1) shows error windows with following content:

ERROR: SDL Error
No available displays
The error occurred at: Source/utils/display.cpp line 311

from ja2-stracciatella.

Srandista avatar Srandista commented on June 9, 2024

Does VNC support OpenGL? What happens if you try to start the game with the environment variable SDL_RENDER_DRIVER set to software, env SDL_RENDER_DRIVER=software ./ja2 ? (Performance will be terrible if that works, but that's expected).

Tried that environment variable on RPi, and it won't run with the same error message like before.

from ja2-stracciatella.

momoko-h avatar momoko-h commented on June 9, 2024

Thought so. So looks like SDL doesn't play nicely with VNC in some cases, which means there's nothing we can do, unless there is a workaround somehow.

(We should definitely improve our error handling, though).

from ja2-stracciatella.

Srandista avatar Srandista commented on June 9, 2024

I looked a bit more over internet and I found this bug report:

libsdl-org/SDL#8054

With "env SDL_VIDEO_X11_XRANDR=0 ./ja" the error in status window is bypassed, game tries to start, but I'm stuck on blinking SirTech logo.

from ja2-stracciatella.

Srandista avatar Srandista commented on June 9, 2024

It seems to be an issue with the SDL at the end (I just find out about it with JA2S, before I tested other SDL based games), since the issue also happens on latest SDL library from Debian Sid (2.28.5) and with different VNC server (x11vnc) as well. I will raise the issue on their GitHub.

from ja2-stracciatella.

lynxlynxlynx avatar lynxlynxlynx commented on June 9, 2024

Ok, closing then.

from ja2-stracciatella.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.