mAttribs.mode[1] = mode[1];
mAttribs.mode[2] = mode[2];
-#if defined(_WIN32) || defined(__WIN32__)
- // on win32, creating a new context via SDL_SetVideoMode will wipe
- // out the GL state, so we gotta notify everyone to reload their
- // state after the change
- core.dispatch("video.newcontext");
+#if !defined(linux) && !defined(__linux) && !defined(__linux__)
logInfo("video context recreated");
+ core.dispatch("video.newcontext");
#endif
}
- else throw Error(Error::SDL_VIDEOMODE);
+ else Error(Error::SDL_VIDEOMODE).raise();
}
}
}
else
{
- while (*(modes + 1)) ++modes; // skip to the last
-
mode[0] = (*modes)->w;
mode[1] = (*modes)->h;
Mf::logInfo << "choosing native resolution "