Fix state saving and loading in linux. Apparently that is why the OpenGL_MakeCurent was in the video plugin DoState.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5265 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-04-01 23:13:26 +00:00
parent a744391aac
commit f6c8fd691a
3 changed files with 28 additions and 20 deletions

View File

@ -355,6 +355,9 @@ void Initialize(void *init)
}
void DoState(unsigned char **ptr, int mode) {
#if defined(HAVE_X11) && HAVE_X11
OpenGL_MakeCurrent();
#endif
// Clear all caches that touch RAM
TextureMngr::Invalidate(false);
VertexLoaderManager::MarkAllDirty();
@ -378,7 +381,7 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
// This is called after Video_Initialize() from the Core
void Video_Prepare(void)
{
OpenGL_MakeCurrent();
OpenGL_Initialize();
if (!Renderer::Init()) {
g_VideoInitialize.pLog("Renderer::Create failed\n", TRUE);
PanicAlert("Can't create opengl renderer. You might be missing some required opengl extensions, check the logs for more info");