mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
More WIP OGL EventHandler work by shuffle2 and myself. Wiimote isn't implemented yet and OGL window is too small (should take window borders into account when creating window).
Not committing VideoOGL.vcproj so that project compiles with old OGL video window. In order to test just replace main.cpp/GLUtil.cpp/GLUtil.h with nmain.cpp/nGLUtil.cpp/nGLUtil.h in the project. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2038 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
#include "LookUpTables.h"
|
||||
#include "ImageWrite.h"
|
||||
#include "Render.h"
|
||||
#include "GLUtil.h"
|
||||
#include "nGLUtil.h"
|
||||
#include "Fifo.h"
|
||||
#include "OpcodeDecoding.h"
|
||||
#include "TextureMngr.h"
|
||||
@ -47,6 +47,53 @@
|
||||
SVideoInitialize g_VideoInitialize;
|
||||
PLUGIN_GLOBALS* globals;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Nasty stuff which win32 needs for wxw
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#if defined(_WIN32) && defined(HAVE_WX) && HAVE_WX
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
class wxDLLApp : public wxApp
|
||||
{
|
||||
bool OnInit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||
DWORD dwReason, // reason called
|
||||
LPVOID lpvReserved) // reserved
|
||||
{
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{ // Use wxInitialize() if you don't want GUI instead of the following 12 lines
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
int argc = 0;
|
||||
char **argv = NULL;
|
||||
wxEntryStart(argc, argv);
|
||||
if ( !wxTheApp || !wxTheApp->CallOnInit() )
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
wxEntryCleanup(); // Use wxUninitialize() if you don't want GUI
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* Create debugging window. There's currently a strange crash that occurs whe a game is loaded
|
||||
if the OpenGL plugin was loaded before. I'll try to fix that. Currently you may have to
|
||||
clsoe the window if it has auto started, and then restart it after the dll has loaded
|
||||
@ -102,11 +149,15 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
ConfigDialog frame(NULL);
|
||||
g_Config.Load();
|
||||
OpenGL_AddBackends(&frame);
|
||||
OpenGL_AddResolutions(&frame);
|
||||
frame.ShowModal();
|
||||
wxWindow * win = new wxWindow();
|
||||
win->SetHWND((WXHWND)_hParent);
|
||||
win->AdoptAttributesFromHWND();
|
||||
//win->Reparent(wxGetApp().GetTopWindow());
|
||||
ConfigDialog *frame = new ConfigDialog(win);
|
||||
g_Config.Load();
|
||||
OpenGL_AddBackends(frame);
|
||||
OpenGL_AddResolutions(frame);
|
||||
frame->ShowModal();
|
||||
}
|
||||
|
||||
void Initialize(void *init)
|
||||
@ -242,14 +293,6 @@ unsigned int Video_Screenshot(TCHAR* _szFilename)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight, s32 _dwYOffset)
|
||||
{
|
||||
if(g_Config.bUseXFB)
|
||||
{
|
||||
XFB_Draw(_pXFB, _dwWidth, _dwHeight, _dwYOffset);
|
||||
}
|
||||
}
|
||||
|
||||
void Video_AddMessage(const char* pstr, u32 milliseconds)
|
||||
{
|
||||
Renderer::AddMessage(pstr,milliseconds);
|
||||
|
Reference in New Issue
Block a user