diff --git a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp index 270f494b98..9ceb9c09f9 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp @@ -2,6 +2,7 @@ #include #include "../../Core/Src/Core.h" +#include "Globals.h" #include "EmuWindow.h" namespace EmuWindow @@ -68,7 +69,7 @@ namespace EmuWindow } - HWND OpenWindow(HWND parent, HINSTANCE hInstance, bool windowed, int width, int height, const TCHAR *title) + HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const TCHAR *title) { wndClass.cbSize = sizeof( wndClass ); wndClass.style = CS_HREDRAW | CS_VREDRAW; @@ -86,7 +87,7 @@ namespace EmuWindow m_hInstance = hInstance; RegisterClassEx( &wndClass ); - if (parent && windowed) + if (parent) { m_hWnd = CreateWindow(m_szClassName, title, WS_CHILD, @@ -99,7 +100,7 @@ namespace EmuWindow } else { - DWORD style = windowed ? WS_OVERLAPPEDWINDOW : WS_POPUP; + DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW; RECT rc = {0, 0, width, height}; AdjustWindowRect(&rc, style, false); @@ -135,7 +136,7 @@ namespace EmuWindow HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title) { - return OpenWindow(hParent, hInstance, true, 640, 480, title); + return OpenWindow(hParent, hInstance, 640, 480, title); } void Close() diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp index bf856daff5..9e7be5c218 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp @@ -155,20 +155,22 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight #if defined(_WIN32) // create the window - if (!g_Config.renderToMainframe || g_VideoInitialize.pWindowHandle == NULL) { - // create the window - g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait..."); - if (g_VideoInitialize.pWindowHandle == NULL) { - SysMessage("failed to create window"); - return false; - } - EmuWindow::Show(); + if (!g_Config.renderToMainframe || g_VideoInitialize.pWindowHandle == NULL) + { + g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait..."); } else { g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, "Please wait..."); } + EmuWindow::Show(); + if (g_VideoInitialize.pWindowHandle == NULL) + { + SysMessage("failed to create window"); + return false; + } + GLuint PixelFormat; // Holds The Results After Searching For A Match DWORD dwExStyle; // Window Extended Style DWORD dwStyle; // Window Style @@ -197,17 +199,18 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight return false; } } - else { + else + { // change to default resolution ChangeDisplaySettings(NULL, 0); } - if (g_Config.bFullscreen) { - dwExStyle=WS_EX_APPWINDOW; - dwStyle=WS_POPUP; - //ShowCursor(FALSE); + if (g_Config.bFullscreen && !g_Config.renderToMainframe) + { + ShowCursor(FALSE); } - else { + else + { dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; dwStyle=WS_OVERLAPPEDWINDOW; } @@ -391,7 +394,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight XMapRaised(GLWin.dpy, GLWin.win); } #else - //SDL fo other OS (osx, bsd, ...) + //SDL for other OS (osx, bsd, ...) int videoFlags = SDL_OPENGL; SDL_Surface *screen; const SDL_VideoInfo *videoInfo; @@ -409,7 +412,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight SDL_Quit(); return false; } - //hw o sw ogl ? + //hw or sw ogl ? if (videoInfo->hw_available) videoFlags |= SDL_HWSURFACE; else diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index 1d57fd21f8..4d4488b766 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -103,10 +103,9 @@ void ConfigDialog::CreateGUIControls() wxStaticText *AAText = new wxStaticText(m_PageVideo, ID_AATEXT, wxT("Anti-alias mode:"), wxDefaultPosition, wxDefaultSize, 0); wxArrayString arrayStringFor_AliasModeCB; - m_AliasModeCB = new wxComboBox(m_PageVideo, ID_ALIASMODECB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_AliasModeCB, wxCB_READONLY, wxDefaultValidator); + m_AliasModeCB = new wxComboBox(m_PageVideo, ID_ALIASMODECB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_AliasModeCB, 0, wxDefaultValidator); wxString tmp; tmp<SetValue(tmp); //page2 diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h index e445bd0715..859da4c453 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h @@ -43,7 +43,6 @@ class ConfigDialog : public wxDialog public: ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("OpenGL Plugin Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = ConfigDialog_STYLE); virtual ~ConfigDialog(); - void ConfigDialogActivate(wxActivateEvent& event); void OKClick(wxCommandEvent& event); void FullScreenCheck(wxCommandEvent& event); void RenderMainCheck(wxCommandEvent& event); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h index 893bce692c..60ad8bc772 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h @@ -145,7 +145,6 @@ struct Config char texDumpPath[280]; //currently unused: - int aa; // anti-aliasing level int iLog; // CONF_ bits int iSaveTargetId; int iAdapter; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp index 54e3f9e993..d736b29a82 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp @@ -135,7 +135,7 @@ namespace EmuWindow } - HWND OpenWindow(HWND parent, HINSTANCE hInstance, bool windowed, int width, int height, const TCHAR *title) + HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const TCHAR *title) { wndClass.cbSize = sizeof( wndClass ); wndClass.style = CS_HREDRAW | CS_VREDRAW; @@ -153,7 +153,7 @@ namespace EmuWindow m_hInstance = hInstance; RegisterClassEx( &wndClass ); - if (parent && windowed) + if (parent) { m_hWnd = CreateWindow(m_szClassName, title, WS_CHILD, @@ -166,7 +166,7 @@ namespace EmuWindow } else { - DWORD style = windowed ? WS_OVERLAPPEDWINDOW : WS_POPUP; + DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW; RECT rc = {0, 0, width, height}; AdjustWindowRect(&rc, style, false); @@ -202,7 +202,7 @@ namespace EmuWindow HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title) { - return OpenWindow(hParent, hInstance, true, 640, 480, title); + return OpenWindow(hParent, hInstance, 640, 480, title); } void Close() diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 2babc39b31..45bb8c665f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -233,7 +233,7 @@ bool Renderer::Create2() s_pfont = new RasterFont(); - SetAA(g_Config.aa); + SetAA(g_Config.iMultisampleMode); GL_REPORT_ERROR(); // load the effect, find the best profiles (if any)