summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglmode.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-06-30 18:02:23 +0800
committerChia-I Wu <[email protected]>2010-06-30 18:32:48 +0800
commit8b0c6c4a8dc1899d56e52fe3b0a9e1165c30ecae (patch)
tree8c92befc4b999c6b67e5c30e5edb4f0bbc76ec8c /src/egl/main/eglmode.c
parent6717a313f26e42a7864f46f499637462a7cc3d57 (diff)
egl: Store screens in a dynamic array.
Diffstat (limited to 'src/egl/main/eglmode.c')
-rw-r--r--src/egl/main/eglmode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/egl/main/eglmode.c b/src/egl/main/eglmode.c
index 66446c0495d..859e9318b4a 100644
--- a/src/egl/main/eglmode.c
+++ b/src/egl/main/eglmode.c
@@ -22,9 +22,12 @@ _eglLookupMode(EGLModeMESA mode, _EGLDisplay *disp)
{
EGLint scrnum;
+ if (!disp->Screens)
+ return NULL;
+
/* loop over all screens on the display */
- for (scrnum = 0; scrnum < disp->NumScreens; scrnum++) {
- const _EGLScreen *scrn = disp->Screens[scrnum];
+ for (scrnum = 0; scrnum < disp->Screens->Size; scrnum++) {
+ const _EGLScreen *scrn = disp->Screens->Elements[scrnum];
EGLint i;
/* search list of modes for handle */
for (i = 0; i < scrn->NumModes; i++) {