The Mega Change Of Doom - or, fixing Stop. Almost. At least it's better than before. However, the OpenGL plugin seems to lose textures a lot between game restarts :P I think the GL plugin needs to do a lot more cleanup.

This change also includes tons of minor code formatting cleanup. Yeah, should've separated it ... sorry :(

Kills the old CPUCompare support. I'll resurrect it if I need it again, right now it mostly clutters the code.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2321 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-02-20 22:04:52 +00:00
parent f992dae50d
commit 6cd34b318f
47 changed files with 685 additions and 1088 deletions

View File

@ -91,20 +91,19 @@ extern bool gShowDebugger;
//////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// The rendering window
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
namespace EmuWindow
{
HWND m_hWnd = NULL; // The new window that is created here
HWND m_hParent = NULL, m_hMain = NULL; // The main CPanel
HWND m_hParent = NULL;
HWND m_hMain = NULL; // The main CPanel
HINSTANCE m_hInstance = NULL;
WNDCLASSEX wndClass;
const TCHAR m_szClassName[] = "DolphinEmuWnd";
int g_winstyle;
// ------------------------------------------
/* Invisible cursor option. In the lack of a predefined IDC_BLANK we make
@ -117,7 +116,7 @@ namespace EmuWindow
BYTE XORmaskCursor[] = { 0x00 };
hCursorBlank = CreateCursor(hInstance, 0,0, 1,1, ANDmaskCursor,XORmaskCursor);
hCursor = LoadCursor( NULL, IDC_ARROW );
hCursor = LoadCursor(NULL, IDC_ARROW);
}
@ -156,25 +155,27 @@ namespace EmuWindow
/* The fullscreen option for Windows users is not very user friendly. With this the user
can only get out of the fullscreen mode by pressing Esc or Alt + F4. Esc also stops
the emulation. Todo: But currently it hangs, so I have disabled the shutdown. */
//if(m_hParent == NULL) ExitProcess(0);
if(m_hParent == NULL)
//if (m_hParent == NULL) ExitProcess(0);
if (m_hParent == NULL)
{
if (g_Config.bFullscreen)
{
//PostMessage(m_hMain, WM_USER, OPENGL_WM_USER_STOP, 0); // Stop
}
else
{
// Toggle maximize and restore
if (IsZoomed(hWnd)) ShowWindow(hWnd, SW_RESTORE); else ShowWindow(hWnd, SW_MAXIMIZE);
if (IsZoomed(hWnd))
ShowWindow(hWnd, SW_RESTORE);
else
ShowWindow(hWnd, SW_MAXIMIZE);
}
return 0;
}
break;
/*
case MY_KEYS:
hypotheticalScene->sendMessage(KEYDOWN...);
*/
case 'E': // EFB hotkey
if(g_Config.bEFBCopyDisableHotKey)
if (g_Config.bEFBCopyDisableHotKey)
{
g_Config.bEFBCopyDisable = !g_Config.bEFBCopyDisable;
Renderer::AddMessage(StringFromFormat("Copy EFB was turned %s",
@ -206,9 +207,9 @@ namespace EmuWindow
case WM_USER:
/* I set wParam to 10 just in case there are other WM_USER events. If we want more
WM_USER cases we would start making wParam or lParam cases */
if(wParam == 10)
if (wParam == 10)
{
if(lParam)
if (lParam)
SetCursor(hCursor);
else
SetCursor(hCursorBlank);
@ -225,24 +226,13 @@ namespace EmuWindow
// This is called when we close the window when we render to a separate window
case WM_CLOSE:
if(m_hParent == NULL)
if (m_hParent == NULL)
{
// Simple hack to easily exit without stopping. Hope to fix the stopping errors soon.
ExitProcess(0);
/* Attempt to only Stop when we close the separate window. But it didn't work, it hanged.
It may need some more coordination with the Stop code in the Core */
//PostMessage(m_hMain, WM_USER, 5, 0);
return 0;
}
/* This is called from the Core when we Stop, but currently we only use DefWindowProc(),
whatever that does with it, if any */
//case WM_QUIT:
//Video_Shutdown();
// ExitProcess(0);
// return 0;
case WM_DESTROY:
//Shutdown();
//PostQuitMessage( 0 ); // Call WM_QUIT