#include "eglmode.h"
#include "eglcurrent.h"
#include "eglscreen.h"
+#include "eglstring.h"
#define MIN2(A, B) (((A) < (B)) ? (A) : (B))
-static char *
-my_strdup(const char *s)
-{
- if (s) {
- int l = strlen(s);
- char *s2 = malloc(l + 1);
- if (s2)
- strcpy(s2, s);
- return s2;
- }
- else {
- return NULL;
- }
-}
-
-
/**
* Given an EGLModeMESA handle, return the corresponding _EGLMode object
* or null if non-existant.
screen->Modes[n].RefreshRate = refreshRate;
screen->Modes[n].Optimal = EGL_FALSE;
screen->Modes[n].Interlaced = EGL_FALSE;
- screen->Modes[n].Name = my_strdup(name);
+ screen->Modes[n].Name = _eglstrdup(name);
screen->NumModes++;
return screen->Modes + n;
}