New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General fixes and definitions for GO Advance clones #455
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
@@ -19,6 +20,8 @@ | |||
#include "myalign.h" | |||
#include "threads.h" | |||
|
|||
#include "wrappedsdl2defs.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it
#include "generated/wrappedsdl2defs.h
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the use of this if
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this one should be inside an #ifdef GOA_CLONE
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, this workaround was a tiny bit too jerry rigged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_entry
BOX86_FORCE_ES
that forces a specific OpenGL ES context version, allowing for the user to specify, e.g.BOX86_FORCE_ES=31
orBOX86_FORCE_ES=2
for GLES 3.1 or GLES 2.0 respectively.A number of general fixes and workaroundsA workaround to ensure no silentgetpwuid
failure causing crashes.