|
|
@@ -745,7 +745,7 @@ static Attribute all_attributes[] = {
|
|
|
static void dumpconfig(SDL_VideoDevice *_this, EGLConfig config)
|
|
|
{
|
|
|
int attr;
|
|
|
- for (attr = 0; attr < sizeof(all_attributes) / sizeof(Attribute); attr++) {
|
|
|
+ for (attr = 0; attr < SDL_arraysize(all_attributes); attr++) {
|
|
|
EGLint value;
|
|
|
_this->egl_data->eglGetConfigAttrib(_this->egl_data->egl_display, config, all_attributes[attr].attribute, &value);
|
|
|
SDL_Log("\t%-32s: %10d (0x%08x)", all_attributes[attr].name, value, value);
|
|
|
@@ -1065,7 +1065,7 @@ SDL_GLContext SDL_EGL_CreateContext(SDL_VideoDevice *_this, EGLSurface egl_surfa
|
|
|
#endif
|
|
|
|
|
|
if (_this->egl_contextattrib_callback) {
|
|
|
- const int maxAttribs = sizeof(attribs) / sizeof(attribs[0]);
|
|
|
+ const int maxAttribs = SDL_arraysize(attribs);
|
|
|
EGLint *userAttribs, *userAttribP;
|
|
|
userAttribs = _this->egl_contextattrib_callback(_this->egl_attrib_callback_userdata, _this->egl_data->egl_display, _this->egl_data->egl_config);
|
|
|
if (!userAttribs) {
|
|
|
@@ -1298,7 +1298,7 @@ EGLSurface SDL_EGL_CreateSurface(SDL_VideoDevice *_this, SDL_Window *window, Nat
|
|
|
#endif
|
|
|
|
|
|
if (_this->egl_surfaceattrib_callback) {
|
|
|
- const int maxAttribs = sizeof(attribs) / sizeof(attribs[0]);
|
|
|
+ const int maxAttribs = SDL_arraysize(attribs);
|
|
|
EGLint *userAttribs, *userAttribP;
|
|
|
userAttribs = _this->egl_surfaceattrib_callback(_this->egl_attrib_callback_userdata, _this->egl_data->egl_display, _this->egl_data->egl_config);
|
|
|
if (!userAttribs) {
|