some more minor changes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@68 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
fires.gc 2008-07-23 16:32:38 +00:00
parent ea1bf8c51a
commit 1040cb1512
2 changed files with 66 additions and 69 deletions

View File

@ -18,9 +18,55 @@
#include <windows.h> #include <windows.h>
#include "../Globals.h"
#include "../../Core/Src/Core.h" #include "../../Core/Src/Core.h"
#include "Win32.h" #include "Win32.h"
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:
CloseConsole();
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
break;
default:
break;
}
g_hInstance = hinstDLL;
return TRUE;
}
namespace EmuWindow namespace EmuWindow
{ {
HWND m_hWnd = NULL; HWND m_hWnd = NULL;

View File

@ -17,6 +17,10 @@
#include "Globals.h" #include "Globals.h"
#ifdef _WIN32
#include "OS\Win32.h"
#endif
#include "GUI/ConfigDlg.h" #include "GUI/ConfigDlg.h"
#include "Render.h" #include "Render.h"
@ -25,64 +29,13 @@
#include "OpcodeDecoding.h" #include "OpcodeDecoding.h"
#include "TextureMngr.h" #include "TextureMngr.h"
#include "BPStructs.h" #include "BPStructs.h"
#ifdef _WIN32
#include "OS\Win32.h"
#else
//#include "Linux/Linux.h"
#endif
#include "VertexLoader.h" #include "VertexLoader.h"
#include "PixelShaderManager.h" #include "PixelShaderManager.h"
#include "VertexShaderManager.h" #include "VertexShaderManager.h"
HINSTANCE g_hInstance = NULL;
SVideoInitialize g_VideoInitialize; SVideoInitialize g_VideoInitialize;
#define VERSION_STRING "0.1" #define VERSION_STRING "0.1"
class wxDLLApp : public wxApp
{
bool OnInit()
{
return true;
}
};
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
#ifdef _WIN32
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:
CloseConsole();
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
break;
default:
break;
}
g_hInstance = hinstDLL;
return TRUE;
}
#endif
void GetDllInfo (PLUGIN_INFO* _PluginInfo) void GetDllInfo (PLUGIN_INFO* _PluginInfo)
{ {
@ -99,6 +52,7 @@ void GetDllInfo (PLUGIN_INFO* _PluginInfo)
#endif #endif
} }
void DllAbout(HWND _hParent) void DllAbout(HWND _hParent)
{ {
wxAboutDialogInfo info; wxAboutDialogInfo info;
@ -107,31 +61,27 @@ void DllAbout(HWND _hParent)
wxAboutBox(info); wxAboutBox(info);
} }
void DllConfig(HWND _hParent) void DllConfig(HWND _hParent)
{ {
#ifdef _WIN32 #ifdef _WIN32
wxWindow win; wxWindow win;
win.SetHWND((WXHWND)_hParent); win.SetHWND((WXHWND)_hParent);
win.Enable(false); win.Enable(false);
ConfigDialog frame(&win);
frame.ShowModal();
#else
ConfigDialog frame(NULL);
frame.ShowModal();
#endif
/* wxWindow win;
win.SetHWND((WXHWND)_hParent);
win.Enable(false);
ConfigDialog frame(&win); ConfigDialog frame(&win);
frame.ShowModal(); frame.ShowModal();
win.Enable(true); win.Enable(true);
win.SetHWND(0); */ win.SetHWND(0);
#else
ConfigDialog frame(NULL);
frame.ShowModal();
#endif
} }
void Video_Initialize(SVideoInitialize* _pVideoInitialize) void Video_Initialize(SVideoInitialize* _pVideoInitialize)
{ {
if (_pVideoInitialize == NULL) if (_pVideoInitialize == NULL)
@ -155,9 +105,6 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize)
_pVideoInitialize->pWindowHandle = g_VideoInitialize.pWindowHandle; _pVideoInitialize->pWindowHandle = g_VideoInitialize.pWindowHandle;
} }
#ifdef _WIN32
HANDLE g_hthread;
#endif
void Video_Prepare(void) void Video_Prepare(void)
{ {
@ -178,6 +125,7 @@ void Video_Prepare(void)
GL_REPORT_ERRORD(); GL_REPORT_ERRORD();
} }
void Video_Shutdown(void) void Video_Shutdown(void)
{ {
VertexShaderMngr::Shutdown(); VertexShaderMngr::Shutdown();
@ -206,6 +154,7 @@ void DebugLog(const char* _fmt, ...)
#endif #endif
} }
bool ScreenShot(TCHAR *File) bool ScreenShot(TCHAR *File)
{ {
char str[64]; char str[64];
@ -213,8 +162,8 @@ bool ScreenShot(TCHAR *File)
sprintf(str, "Dolphin OGL " VERSION_STRING); sprintf(str, "Dolphin OGL " VERSION_STRING);
Renderer::ResetGLState(); Renderer::ResetGLState();
// Renderer::DrawText(str, left+1, top+1, 0xff000000); Renderer::DrawText(str, left+1, top+1, 0xff000000);
// Renderer::DrawText(str, left, top, 0xffc0ffff); Renderer::DrawText(str, left, top, 0xffc0ffff);
Renderer::RestoreGLState(); Renderer::RestoreGLState();
if (Renderer::SaveRenderTarget(File, 0)) { if (Renderer::SaveRenderTarget(File, 0)) {
@ -226,6 +175,7 @@ bool ScreenShot(TCHAR *File)
return false; return false;
} }
BOOL Video_Screenshot(TCHAR* _szFilename) BOOL Video_Screenshot(TCHAR* _szFilename)
{ {
if (ScreenShot(_szFilename)) if (ScreenShot(_szFilename))
@ -234,6 +184,7 @@ BOOL Video_Screenshot(TCHAR* _szFilename)
return FALSE; return FALSE;
} }
void Video_UpdateXFB(BYTE* _pXFB, DWORD _dwWidth, DWORD _dwHeight) void Video_UpdateXFB(BYTE* _pXFB, DWORD _dwWidth, DWORD _dwHeight)
{ {
} }