From 794f6561883e7f8fdd5db241cddf2811075701c2 Mon Sep 17 00:00:00 2001 From: daco65 Date: Wed, 27 Aug 2008 11:45:51 +0000 Subject: [PATCH] fixed Video_SaveState & Video_LoadState in OGL/DX that made dolphin unable to load the plugins git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@352 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX9/Src/main.cpp | 4 +- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 46 ++++++++++----------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index dd54c2adfe..453902a3d9 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -166,12 +166,12 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize) } -void Video_SaveState() { +void Video_SaveState(void) { VideoCommon_SaveState(); //PanicAlert("Saving state from DirectX9"); } -void Video_LoadState() { +void Video_LoadState(void) { VideoCommon_LoadState(); //PanicAlert("Loading state from DirectX9"); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 83e58306dc..033c8e944a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -83,27 +83,27 @@ void DllConfig(HWND _hParent) while(EnumDisplaySettings(NULL, iModeNum++, &dmi) != 0) { - char szBuffer[100]; - sprintf(szBuffer,"%dx%d", dmi.dmPelsWidth, dmi.dmPelsHeight); - //making a string cause char*[] to char was a baaad idea - std::string strBuffer(szBuffer); - //create a check loop to check every pointer of resos to see if the res is added or not - int b = 0; - bool resFound = false; - while(b < i && !resFound) - { - //is the res already added? - resFound = (resos[b] == strBuffer); - b++; - } - if(!resFound) - //and add the res - { - resos[i] = strBuffer; - i++; - frame.AddFSReso(szBuffer); - frame.AddWindowReso(szBuffer); - } + char szBuffer[100]; + sprintf(szBuffer,"%dx%d", dmi.dmPelsWidth, dmi.dmPelsHeight); + //making a string cause char*[] to char was a baaad idea + std::string strBuffer(szBuffer); + //create a check loop to check every pointer of resos to see if the res is added or not + int b = 0; + bool resFound = false; + while(b < i && !resFound) + { + //is the res already added? + resFound = (resos[b] == strBuffer); + b++; + } + if(!resFound) + //and add the res + { + resos[i] = strBuffer; + i++; + frame.AddFSReso(szBuffer); + frame.AddWindowReso(szBuffer); + } ZeroMemory(&dmi, sizeof(dmi)); } frame.ShowModal(); @@ -179,12 +179,12 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize) } -void Video_SaveState() { +void Video_SaveState(void) { VideoCommon_SaveState(); //PanicAlert("Saving state from OpenGL"); } -void Video_LoadState() { +void Video_LoadState(void) { VideoCommon_LoadState(); //PanicAlert("Loading state from OpenGL"); }