Closed Ch0wW closed 5 years ago
This has not yet been updated for use with latest libnx, which has some potentially breaking gfx changes.
Indeed, some of the changes broke some parts.
I managed to compile and adapt it (commit ==> https://github.com/Ch0wW/QuakespasmNX/commit/c96d3659aafc9d8d73a18d18e76ae68c94ab7dcd ) . However, now it crashes saying the following :
Error: Couldn't init SDL video: displayIndex must be in the range 0 - -1.
Yeah, I tried the same after your NXQuake 2 PR and got the same error. There has been a long-running memory corruption issue that I haven't tracked down, maybe that's what's causing this.
For a dumb and ugly workaround we can just avoid initializing SDL video and creating windows entirely, instead polling input manually. I tried that in the Doom 3 port and it works, but it's really not a good solution. The fact that I have been poking around EGL shit and using SDL video at the same time and nothing has broken before is kind of a miracle in itself.
This has been fixed in the latest revision. I misunderstood some things related to how SDL2 graphics work.
Turns out that using nwindowGetDefault()
or the default console renderer at all brings in additional init/deinit routines that break some stuff in SDL because vi and the display are already initialized when we're calling SDL_CreateWindow
. So we need to either exclusively use SDL stuff or do whatever we were doing before.
Devkitpro is at the latest version.
Strangely, nxQuake2 doesn't have the compiling error that QuakeSpasmNX does.