diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp index f9217cfc927..88afaca7085 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp @@ -62,7 +62,7 @@ struct TabDirect3D : public W32Util::Tab CheckDlgButton(hDlg, IDC_FULLSCREENENABLE, g_Config.bFullscreen ? TRUE : FALSE); CheckDlgButton(hDlg, IDC_VSYNC, g_Config.bVsync ? TRUE : FALSE); - CheckDlgButton(hDlg, IDC_RENDER_IN_MAINWINDOW, g_Config.renderInMainframe ? TRUE : FALSE); + CheckDlgButton(hDlg, IDC_RENDER_TO_MAINWINDOW, g_Config.renderToMainframe ? TRUE : FALSE); } void Command(HWND hDlg,WPARAM wParam) @@ -84,7 +84,7 @@ struct TabDirect3D : public W32Util::Tab g_Config.iFSResolution = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION)); g_Config.bFullscreen = Button_GetCheck(GetDlgItem(hDlg, IDC_FULLSCREENENABLE)) ? true : false; g_Config.bVsync = Button_GetCheck(GetDlgItem(hDlg, IDC_VSYNC)) ? true : false; - g_Config.renderInMainframe = Button_GetCheck(GetDlgItem(hDlg, IDC_RENDER_IN_MAINWINDOW)) ? true : false; + g_Config.renderToMainframe = Button_GetCheck(GetDlgItem(hDlg, IDC_RENDER_TO_MAINWINDOW)) ? true : false; g_Config.Save(); } }; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp index db3ba9ffe51..8ff072fe818 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp @@ -15,7 +15,7 @@ void Config::Load() iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0); iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0); iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0); - iniFile.Get("Hardware", "RenderInMainframe", &renderInMainframe, true); + iniFile.Get("Hardware", "RenderInMainframe", &renderToMainframe, true); iniFile.Get("Hardware", "VSync", &bVsync, 0); if (iAdapter == -1) iAdapter = 0; @@ -41,7 +41,7 @@ void Config::Save() iniFile.Set("Hardware", "FullscreenRes", iFSResolution); iniFile.Set("Hardware", "Fullscreen", bFullscreen); iniFile.Set("Hardware", "VSync", bVsync); - iniFile.Set("Hardware", "RenderInMainframe", renderInMainframe); + iniFile.Set("Hardware", "RenderInMainframe", renderToMainframe); iniFile.Set("Settings", "OverlayStats", bOverlayStats); iniFile.Set("Settings", "OverlayStats", bOverlayStats); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Globals.h b/Source/Plugins/Plugin_VideoDX9/Src/Globals.h index 9800d903524..0167ea67c39 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Globals.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/Globals.h @@ -16,7 +16,7 @@ struct Config int iPostprocessEffect; int iCompileDLsLevel; - bool renderInMainframe; + bool renderToMainframe; bool bFullscreen; bool bVsync; bool bWireFrame; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index d03fde5d80e..8d8b45655a6 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -71,7 +71,7 @@ bool Init() if (initCount==0) { // create the window - if( !g_Config.renderInMainframe || g_VideoInitialize.pWindowHandle == NULL ) // ignore parent for this plugin + if( !g_Config.renderToMainframe || g_VideoInitialize.pWindowHandle == NULL ) // ignore parent for this plugin { g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait..."); } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/resource.h b/Source/Plugins/Plugin_VideoDX9/Src/resource.h index 4aac2298ffc..231b90ec792 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/resource.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/resource.h @@ -17,8 +17,7 @@ #define IDC_FULLSCREENENABLE2 1003 #define IDC_VSYNC 1003 #define IDC_DEBUGSTEP 1004 -#define IDC_VSYNC2 1004 -#define IDC_RENDER_IN_MAINWINDOW 1004 +#define IDC_RENDER_TO_MAINWINDOW 1004 #define IDC_REGISTERS 1005 #define IDC_ENABLEDEBUGGING 1006 #define IDC_TAB1 1007 diff --git a/Source/Plugins/Plugin_VideoDX9/Src/resource.rc b/Source/Plugins/Plugin_VideoDX9/Src/resource.rc index 89e99262a9c..8a6a8b967e8 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/resource.rc +++ b/Source/Plugins/Plugin_VideoDX9/Src/resource.rc @@ -91,7 +91,7 @@ BEGIN COMBOBOX IDC_RESOLUTIONWINDOWED,87,81,137,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "&Fullscreen",IDC_FULLSCREENENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,25,141,8 CONTROL "&V-Sync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,38,141,8 - CONTROL "&Render in main window",IDC_RENDER_IN_MAINWINDOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,50,141,8 + CONTROL "&Render to main window",IDC_RENDER_TO_MAINWINDOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,50,141,8 END IDD_DEBUGGER DIALOGEX 0, 0, 234, 254 diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp index 1310cebd9c2..95c085a58f8 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp @@ -21,7 +21,6 @@ #endif #include "GLInit.h" - // Handles OpenGL and the window @@ -104,7 +103,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _width, int _height) #ifdef _WIN32 // create the window - if (g_VideoInitialize.pWindowHandle == NULL) { + 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) { diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp index 5e2ab90f23b..49f5f9e6ef2 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp @@ -82,6 +82,7 @@ void Config::Load() iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0); iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0); iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0); + iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, 0); if (iAdapter == -1) iAdapter = 0; @@ -112,6 +113,7 @@ void Config::Save() iniFile.Set("Hardware", "WindowedRes", iWindowedRes); iniFile.Set("Hardware", "FullscreenRes", iFSResolution); iniFile.Set("Hardware", "Fullscreen", bFullscreen); + iniFile.Set("Hardware", "RenderToMainframe", renderToMainframe); iniFile.Set("Settings", "OverlayStats", bOverlayStats); iniFile.Set("Settings", "OverlayStats", bOverlayStats); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h index daf2f2794f8..9576bb778fd 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h @@ -164,6 +164,7 @@ struct Config int iPostprocessEffect; int iCompileDLsLevel; + bool renderToMainframe; int iLog; // CONF_ bits bool bFullscreen; bool bWireFrame; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Windows/DlgSettings.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Windows/DlgSettings.cpp index b15be9f59ae..ac433649d89 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Windows/DlgSettings.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Windows/DlgSettings.cpp @@ -48,6 +48,7 @@ struct TabOGL : public W32Util::Tab ComboBox_SetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION), g_Config.iFSResolution); CheckDlgButton(hDlg, IDC_FULLSCREENENABLE, g_Config.bFullscreen ? TRUE : FALSE); + CheckDlgButton(hDlg, IDC_RENDER_TO_MAINWINDOW, g_Config.renderToMainframe ? TRUE : FALSE); } void Command(HWND hDlg,WPARAM wParam) @@ -67,6 +68,8 @@ struct TabOGL : public W32Util::Tab g_Config.iMultisampleMode = ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_ANTIALIASMODE)); g_Config.iFSResolution = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION)); g_Config.bFullscreen = Button_GetCheck(GetDlgItem(hDlg, IDC_FULLSCREENENABLE)) ? true : false; + g_Config.renderToMainframe = Button_GetCheck(GetDlgItem(hDlg, IDC_RENDER_TO_MAINWINDOW)) ? true : false; + g_Config.Save(); } }; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.h b/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.h index b3068228bd2..d4c66b6826b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.h @@ -15,6 +15,7 @@ #define IDC_FULLSCREENENABLE 1002 #define IDC_LIST1 1003 #define IDC_DEBUGSTEP 1004 +#define IDC_RENDER_TO_MAINWINDOW 1004 #define IDC_REGISTERS 1005 #define IDC_ENABLEDEBUGGING 1006 #define IDC_TAB1 1007 diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.rc b/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.rc index 1304388e9a4..0080df9f69a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.rc +++ b/Source/Plugins/Plugin_VideoOGL/Src/Windows/resource.rc @@ -78,13 +78,14 @@ IDD_SETTINGS DIALOGEX 0, 0, 231, 141 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Fullscreen video mode:",IDC_STATIC,7,22,74,8 - LTEXT "&Antialias mode:",IDC_STATIC,7,60,61,8 - COMBOBOX IDC_ANTIALIASMODE,68,57,156,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP - LTEXT "&Windowed resolution:",IDC_STATIC,7,41,74,8 - COMBOBOX IDC_RESOLUTIONWINDOWED,87,39,137,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP + LTEXT "&Fullscreen video mode:",IDC_STATIC,7,39,74,8 + LTEXT "&Antialias mode:",IDC_STATIC,7,77,61,8 + COMBOBOX IDC_ANTIALIASMODE,68,74,156,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP + LTEXT "&Windowed resolution:",IDC_STATIC,7,58,74,8 + COMBOBOX IDC_RESOLUTIONWINDOWED,87,56,137,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP CONTROL "&Fullscreen",IDC_FULLSCREENENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,87,7,84,8 - COMBOBOX IDC_RESOLUTION,87,20,137,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RESOLUTION,87,37,137,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP + CONTROL "&Render to main window",IDC_RENDER_TO_MAINWINDOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,87,20,103,8 END IDD_DEBUGGER DIALOGEX 0, 0, 234, 254