ForgiveThisNewb
Member
Thanks, worked like a charm. I also had to edit sdl12/Makefile.cfg and replace all references of "sdl/" with "sdl12/", but once I did that everything was just peachy.This is a bug in SDL2. Try this.
CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" make -C src/ LINUX64=1
If you want to compile for the sdl 1.2 interface, grep for INTERFACE=sdl and change it to INTERFACE=sdl12, and include sdl/Makefile.cfg replace with include sdl12/Makefile.cfg.
I'm thinking the changes to sdl12/Makefile.cfg should be committed upstream, the workaround includes should be specified in a readme or the makefile itself, and an easier way of switching to sdl12 should be implemented. Even more ideally is to make sdl2 support OpenGL and all of the other features sdl12 supports, but that's probably easier said than done.
EDIT:
I'm looking into seeing why openGL doesn't want to work with SDL2. And I've found out something interesting: M_CheckParm("-opengl") always returns 0 with SDL2, but not with SDL12. In fact, if the line "if (M_CheckParm("-opengl") || rendermode == render_opengl)" in sdl/i_video.c has a semicolon added to the end, opengl seems to work just fine at a cursory glance, md2s and all. The only remaining question is, why does M_CheckParm("-opengl") return 0 in SDL2 and now SDL12?
I then realized that my entire problem has to do with including sc_srb2hub_1.3.wad using the -file parameter. When this wad is used with -file on the linux64 sdl2 build, it will reset myargc, something it doesn't so with sdl12. I don't know what about the wad does this, but somehow while loading it screws up parameters. It may have to do with the custom profile/savegames [whatever it's called] the wad has. I put in a hack to restore the value of myargc after calling W_InitMultipleFiles in D_SRB2Main, which is where the value of argc gets reset. In the absence of a proper solution, I'll be using this hack. If someone in stjr wants it, I've submitted a pull request.
Last edited: