mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
added option "render to main window" to opengl video plugin
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@16 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b503d023bc
commit
ceb924f398
@ -62,7 +62,7 @@ struct TabDirect3D : public W32Util::Tab
|
|||||||
|
|
||||||
CheckDlgButton(hDlg, IDC_FULLSCREENENABLE, g_Config.bFullscreen ? TRUE : FALSE);
|
CheckDlgButton(hDlg, IDC_FULLSCREENENABLE, g_Config.bFullscreen ? TRUE : FALSE);
|
||||||
CheckDlgButton(hDlg, IDC_VSYNC, g_Config.bVsync ? 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)
|
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.iFSResolution = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION));
|
||||||
g_Config.bFullscreen = Button_GetCheck(GetDlgItem(hDlg, IDC_FULLSCREENENABLE)) ? true : false;
|
g_Config.bFullscreen = Button_GetCheck(GetDlgItem(hDlg, IDC_FULLSCREENENABLE)) ? true : false;
|
||||||
g_Config.bVsync = Button_GetCheck(GetDlgItem(hDlg, IDC_VSYNC)) ? 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();
|
g_Config.Save();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,7 @@ void Config::Load()
|
|||||||
iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0);
|
iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0);
|
||||||
iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0);
|
iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0);
|
||||||
iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 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);
|
iniFile.Get("Hardware", "VSync", &bVsync, 0);
|
||||||
if (iAdapter == -1)
|
if (iAdapter == -1)
|
||||||
iAdapter = 0;
|
iAdapter = 0;
|
||||||
@ -41,7 +41,7 @@ void Config::Save()
|
|||||||
iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
|
iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
|
||||||
iniFile.Set("Hardware", "Fullscreen", bFullscreen);
|
iniFile.Set("Hardware", "Fullscreen", bFullscreen);
|
||||||
iniFile.Set("Hardware", "VSync", bVsync);
|
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);
|
||||||
iniFile.Set("Settings", "OverlayStats", bOverlayStats);
|
iniFile.Set("Settings", "OverlayStats", bOverlayStats);
|
||||||
|
@ -16,7 +16,7 @@ struct Config
|
|||||||
int iPostprocessEffect;
|
int iPostprocessEffect;
|
||||||
int iCompileDLsLevel;
|
int iCompileDLsLevel;
|
||||||
|
|
||||||
bool renderInMainframe;
|
bool renderToMainframe;
|
||||||
bool bFullscreen;
|
bool bFullscreen;
|
||||||
bool bVsync;
|
bool bVsync;
|
||||||
bool bWireFrame;
|
bool bWireFrame;
|
||||||
|
@ -71,7 +71,7 @@ bool Init()
|
|||||||
if (initCount==0)
|
if (initCount==0)
|
||||||
{
|
{
|
||||||
// create the window
|
// 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...");
|
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait...");
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
#define IDC_FULLSCREENENABLE2 1003
|
#define IDC_FULLSCREENENABLE2 1003
|
||||||
#define IDC_VSYNC 1003
|
#define IDC_VSYNC 1003
|
||||||
#define IDC_DEBUGSTEP 1004
|
#define IDC_DEBUGSTEP 1004
|
||||||
#define IDC_VSYNC2 1004
|
#define IDC_RENDER_TO_MAINWINDOW 1004
|
||||||
#define IDC_RENDER_IN_MAINWINDOW 1004
|
|
||||||
#define IDC_REGISTERS 1005
|
#define IDC_REGISTERS 1005
|
||||||
#define IDC_ENABLEDEBUGGING 1006
|
#define IDC_ENABLEDEBUGGING 1006
|
||||||
#define IDC_TAB1 1007
|
#define IDC_TAB1 1007
|
||||||
|
@ -91,7 +91,7 @@ BEGIN
|
|||||||
COMBOBOX IDC_RESOLUTIONWINDOWED,87,81,137,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
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 "&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 "&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
|
END
|
||||||
|
|
||||||
IDD_DEBUGGER DIALOGEX 0, 0, 234, 254
|
IDD_DEBUGGER DIALOGEX 0, 0, 234, 254
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "GLInit.h"
|
#include "GLInit.h"
|
||||||
|
|
||||||
|
|
||||||
// Handles OpenGL and the window
|
// Handles OpenGL and the window
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +103,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _width, int _height)
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// create the window
|
// create the window
|
||||||
if (g_VideoInitialize.pWindowHandle == NULL) {
|
if (!g_Config.renderToMainframe || g_VideoInitialize.pWindowHandle == NULL) {
|
||||||
// create the window
|
// create the window
|
||||||
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait...");
|
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait...");
|
||||||
if (g_VideoInitialize.pWindowHandle == NULL) {
|
if (g_VideoInitialize.pWindowHandle == NULL) {
|
||||||
|
@ -82,6 +82,7 @@ void Config::Load()
|
|||||||
iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0);
|
iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0);
|
||||||
iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0);
|
iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0);
|
||||||
iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0);
|
iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0);
|
||||||
|
iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, 0);
|
||||||
if (iAdapter == -1)
|
if (iAdapter == -1)
|
||||||
iAdapter = 0;
|
iAdapter = 0;
|
||||||
|
|
||||||
@ -112,6 +113,7 @@ void Config::Save()
|
|||||||
iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
|
iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
|
||||||
iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
|
iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
|
||||||
iniFile.Set("Hardware", "Fullscreen", bFullscreen);
|
iniFile.Set("Hardware", "Fullscreen", bFullscreen);
|
||||||
|
iniFile.Set("Hardware", "RenderToMainframe", renderToMainframe);
|
||||||
|
|
||||||
iniFile.Set("Settings", "OverlayStats", bOverlayStats);
|
iniFile.Set("Settings", "OverlayStats", bOverlayStats);
|
||||||
iniFile.Set("Settings", "OverlayStats", bOverlayStats);
|
iniFile.Set("Settings", "OverlayStats", bOverlayStats);
|
||||||
|
@ -164,6 +164,7 @@ struct Config
|
|||||||
int iPostprocessEffect;
|
int iPostprocessEffect;
|
||||||
int iCompileDLsLevel;
|
int iCompileDLsLevel;
|
||||||
|
|
||||||
|
bool renderToMainframe;
|
||||||
int iLog; // CONF_ bits
|
int iLog; // CONF_ bits
|
||||||
bool bFullscreen;
|
bool bFullscreen;
|
||||||
bool bWireFrame;
|
bool bWireFrame;
|
||||||
|
@ -48,6 +48,7 @@ struct TabOGL : public W32Util::Tab
|
|||||||
ComboBox_SetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION), g_Config.iFSResolution);
|
ComboBox_SetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION), g_Config.iFSResolution);
|
||||||
|
|
||||||
CheckDlgButton(hDlg, IDC_FULLSCREENENABLE, g_Config.bFullscreen ? TRUE : FALSE);
|
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)
|
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.iMultisampleMode = ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_ANTIALIASMODE));
|
||||||
g_Config.iFSResolution = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION));
|
g_Config.iFSResolution = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION));
|
||||||
g_Config.bFullscreen = Button_GetCheck(GetDlgItem(hDlg, IDC_FULLSCREENENABLE)) ? true : false;
|
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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#define IDC_FULLSCREENENABLE 1002
|
#define IDC_FULLSCREENENABLE 1002
|
||||||
#define IDC_LIST1 1003
|
#define IDC_LIST1 1003
|
||||||
#define IDC_DEBUGSTEP 1004
|
#define IDC_DEBUGSTEP 1004
|
||||||
|
#define IDC_RENDER_TO_MAINWINDOW 1004
|
||||||
#define IDC_REGISTERS 1005
|
#define IDC_REGISTERS 1005
|
||||||
#define IDC_ENABLEDEBUGGING 1006
|
#define IDC_ENABLEDEBUGGING 1006
|
||||||
#define IDC_TAB1 1007
|
#define IDC_TAB1 1007
|
||||||
|
@ -78,13 +78,14 @@ IDD_SETTINGS DIALOGEX 0, 0, 231, 141
|
|||||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
|
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
|
||||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "&Fullscreen video mode:",IDC_STATIC,7,22,74,8
|
LTEXT "&Fullscreen video mode:",IDC_STATIC,7,39,74,8
|
||||||
LTEXT "&Antialias mode:",IDC_STATIC,7,60,61,8
|
LTEXT "&Antialias mode:",IDC_STATIC,7,77,61,8
|
||||||
COMBOBOX IDC_ANTIALIASMODE,68,57,156,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_ANTIALIASMODE,68,74,156,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "&Windowed resolution:",IDC_STATIC,7,41,74,8
|
LTEXT "&Windowed resolution:",IDC_STATIC,7,58,74,8
|
||||||
COMBOBOX IDC_RESOLUTIONWINDOWED,87,39,137,73,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
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
|
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
|
END
|
||||||
|
|
||||||
IDD_DEBUGGER DIALOGEX 0, 0, 234, 254
|
IDD_DEBUGGER DIALOGEX 0, 0, 234, 254
|
||||||
|
Loading…
x
Reference in New Issue
Block a user