Release Out of Order


Ok, I can see now all available fields of the struct - what's the best place for this printf then? (still getting `EGLport ERROR: unable to get window!`)

Just after the SDL_SetVideoMode(...)


Also, set the environnement variable to make use to use x11 driver:


exp

Code:
export SDL_VIDEODRIVER=x11
 
Last edited by a moderator:
SDL_SetVideoMode only appears in setGraphicsWindow function so I don't think printf is going to work from there without defining SDL_Surface again. Where in main.cpp should I put it?
 
SDL_SetVideoMode only appears in setGraphicsWindow function so I don't think printf is going to work from there without defining SDL_Surface again. Where in main.cpp should I put it?

In graphics.cpp, change


if( SDL_SetVideoMode( realWinWidth, realWinHeight, 32, videoflags ) == 0 ) {


to something like


SDL_Surface* suf;
if( (surf=SDL_SetVideoMode( realWinWidth, realWinHeight, 32, videoflags )) == 0 ) {
printf("Surface is null!\n");


And then, after the


debugOut( "Video mode %d %d set successfully.\n", realWinWidth, realWinHeight);


put something like

Code:
printf("Surface is %p, size is %dx%dx%d\n", surf->w, surf->h, surf->format->BitsPerPixel);
 
Ah yes, I do many typo! You should be vigilant (maybe the code I'm giving you just install a secret backdoor in your system ;)  )


But, no message on the console? That's weird?! :S
 
Last edited by a moderator:
Well, what do you make of the fact nothing got printed?

Code:
EGLport ERROR: unable to get window!
EGLport ERROR: Unable to obtain native window!
Startup Error
Couldn't initialize EGL.
 
Last edited by a moderator:
Well, what do you make of the fact nothing got printed?

Code:
EGLport ERROR: unable to get window!
EGLport ERROR: Unable to obtain native window!
Startup Error
Couldn't initialize EGL.

That the call come from some other place. I have check again my sources...
 
Ok, I think the EGL_Open is place at the wrong place. I don't notice that on the Pandora because I use Framebuffer context (skipping X11/SDL for the Video).


What you need to do is:


In main.cpp


arround line 350, disable


#if defined(HAVE_GLES2)
if (EGL_Open()) {
msgBox("Startup Error", "Couldn't initialize EGL.");
exit(1);
}
#endif


by putting #if  0 //defined(HAVE_GLES2)


Then, on graphics.cpp


Change


if( SDL_SetVideoMode( realWinWidth, realWinHeight, 32, videoflags ) == 0 ) {
msgBox("Startup Error: Couldn't set video mode.", SDL_GetError());
#if defined(HAVE_GLES2)
EGL_Close();
#endif
SDL_Quit();
exit(2);
}
debugOut( "Video mode %d %d set successfully.\n", realWinWidth, realWinHeight);

#if defined(HAVE_GLES2)
EGL_Init();
#endif


to


if( SDL_SetVideoMode( realWinWidth, realWinHeight, 32, videoflags ) == 0 ) {
msgBox("Startup Error: Couldn't set video mode.", SDL_GetError());
SDL_Quit();
exit(2);
}
debugOut( "Video mode %d %d set successfully.\n", realWinWidth, realWinHeight);

#if defined(HAVE_GLES2)
EGL_Open();
EGL_Init();
#endif



You'll put back the printf if needed, but it should work better this way.
 
Thanks. Any idea why I can't type anything in the Save/Load text fields?


SDL acting up again or problem with focus.
 
Last edited by a moderator:
Definitely, the only modification before the fix was to disable FB. 


However, I'll check the vanilla version @ 32bpp and will let you know. I don't think this should be related to your diff.
 
Last edited by a moderator:
It isn't - it seems Esc or Enter were coming through anyway but there's no way to just start typing. 
 
Hi, I'm the maintainer of SLUDGE. Glad to see, that you made Out Of Order work! I already thought the port to GLES2 was useless, because SLUDGE assumes that every graphic it loads fits into an OpenGL texture. Please make sure to send a pull request on GitHub if you fix bugs or make improvements that are useful in general.
 
Hi, I'm the maintainer of SLUDGE. Glad to see, that you made Out Of Order work! I already thought the port to GLES2 was useless, because SLUDGE assumes that every graphic it loads fits into an OpenGL texture. Please make sure to send a pull request on GitHub if you fix bugs or make improvements that are useful in general.

Sure, I'll do it.


But some of the changes I have made have been done to remove the glReadPixels, as it kiils mobile chip performances. So maybe I'll have to make that optionnal first?
 
Of course we can merge only stuff that does not brake any of the other platforms. You can decide if you want to make the removal of glReadPixels optional or keep it in your own patch. What should definitely be merged back is bugfixes and obvious improvements.
 
@ptitSeb


The patched version works equally well @32bpp so it's a big plus. One difference with the vanilla engine is automatic scaling to fullscreen.


@BigMc


It seems hitting 's' performs a quicksave which then appears on the saves' list. The name can be backspaced but nothing can be typed in - definitely a bug.
 
Last edited by a moderator:
I tried in Slackware 14.1 with Ghz and seems to load and also has sound          but just a black screen :-(
 
Back
Top