General fixes and definitions for GO Advance clones#455
General fixes and definitions for GO Advance clones#455ptitSeb merged 4 commits intoptitSeb:masterfrom
Conversation
Sets compilation definitions for GO Advance clones, such as the RG351p/v, Gameforce Chi, RGB10 and other such devices.
src/wrapped/wrappedsdl2.c
Outdated
| #include "myalign.h" | ||
| #include "threads.h" | ||
|
|
||
| #include "wrappedsdl2defs.h" |
There was a problem hiding this comment.
Isn't it
#include "generated/wrappedsdl2defs.hinstead?
There was a problem hiding this comment.
Got auto-completed by the IDE, assumed that was correct since it worked.
| #define GOS(sym, _w) GOM(sym, _w) | ||
|
|
||
| #define DATA | ||
| if(0); |
There was a problem hiding this comment.
Part of a change that got lost during debugging, it was supposed to allow the GO macros to be else if rather than a chain of endless if
src/wrapped/wrappedsdl2.c
Outdated
| } | ||
|
|
||
| // Cut down and adapted from SDL_video.c | ||
| EXPORT int my2_SDL_GL_ExtensionSupported(x86emu_t* emu, char *name) |
There was a problem hiding this comment.
Maybe this one should be inside an #ifdef GOA_CLONE?
There was a problem hiding this comment.
Likely makes more sense to check for gl4es than GOA_CLONE imho, since that's the reason for this functionality.
src/wrapped/wrappedsdl2.c
Outdated
| symbol = my->SDL_GL_GetProcAddress(name); | ||
| } else { | ||
| char buf[200] = {}; | ||
| symbol = my_glXGetProcAddress(emu, name); |
There was a problem hiding this comment.
what is the point of this? both function will do the same mapping, and the libGL is supposed to be the same.
There was a problem hiding this comment.
That's true, this workaround was a tiny bit too jerry rigged.
There was a problem hiding this comment.
The correct way would've been having used SDL_VIDEO_GL_DRIVER to point towards the shim on egl-based backends, I was using SDL_OPENGL_LIBRARY instead and thus got the weird behavior. I'll be reverting these.
…ersion on SDL_CreateWindow calls.
Fixes Chowdren games dereferencing an offset of a NULL pointer on 351ELEC when getpwuid fails and Chowdren fails to gracefully recover.
230fe62 to
dad2601
Compare
In this PR are contained a number of changes:
SDL_DYNAPI_entryBOX86_FORCE_ESthat forces a specific OpenGL ES context version, allowing for the user to specify, e.g.BOX86_FORCE_ES=31orBOX86_FORCE_ES=2for GLES 3.1 or GLES 2.0 respectively.A number of general fixes and workaroundsA workaround to ensure no silentgetpwuidfailure causing crashes.