mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
added an option to render directx video plugin inside the main frame
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@15 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -66,25 +66,28 @@ void UpdateFPSDisplay(const char *text)
|
||||
|
||||
bool Init()
|
||||
{
|
||||
g_Config.Load();
|
||||
|
||||
if (initCount==0)
|
||||
{
|
||||
// create the window
|
||||
// if( g_VideoInitialize.pWindowHandle == NULL ) // ignore parent for this plugin
|
||||
if( !g_Config.renderInMainframe || g_VideoInitialize.pWindowHandle == NULL ) // ignore parent for this plugin
|
||||
{
|
||||
// create the window
|
||||
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, "Please wait...");
|
||||
if( g_VideoInitialize.pWindowHandle == NULL ) {
|
||||
MessageBox(GetActiveWindow(), "failed to create window", "Fatal Error", MB_OK);
|
||||
return false;
|
||||
}
|
||||
|
||||
g_VideoInitialize.pPeekMessages = Callback_PeekMessages;
|
||||
g_VideoInitialize.pUpdateFPSDisplay = UpdateFPSDisplay;
|
||||
EmuWindow::Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, "Please wait...");
|
||||
}
|
||||
|
||||
if( g_VideoInitialize.pPeekMessages == NULL )
|
||||
return false;
|
||||
if( g_VideoInitialize.pWindowHandle == NULL ) {
|
||||
MessageBox(GetActiveWindow(), "failed to create window", "Fatal Error", MB_OK);
|
||||
return false;
|
||||
}
|
||||
|
||||
EmuWindow::Show();
|
||||
g_VideoInitialize.pPeekMessages = Callback_PeekMessages;
|
||||
g_VideoInitialize.pUpdateFPSDisplay = UpdateFPSDisplay;
|
||||
|
||||
if (FAILED(D3D::Init()))
|
||||
{
|
||||
@ -95,7 +98,6 @@ bool Init()
|
||||
|
||||
}
|
||||
initCount++;
|
||||
g_Config.Load();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user