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

@ -121,11 +121,11 @@ void CDebugger::LoadSettings()
m_Check[1]->SetValue(Console);
file.Get("VideoWindow", "ConfBits", &g_Config.iLog, 0);
bInfoLog = g_Config.iLog & CONF_LOG;
bPrimLog = g_Config.iLog & CONF_PRIMLOG;
bSaveTextures = g_Config.iLog & CONF_SAVETEXTURES;
bSaveTargets = g_Config.iLog & CONF_SAVETARGETS;
bSaveShaders = g_Config.iLog & CONF_SAVESHADERS;
bInfoLog = (g_Config.iLog & CONF_LOG) ? true : false;
bPrimLog = (g_Config.iLog & CONF_PRIMLOG) ? true : false;
bSaveTextures = (g_Config.iLog & CONF_SAVETEXTURES) ? true : false;
bSaveTargets = (g_Config.iLog & CONF_SAVETARGETS) ? true : false;
bSaveShaders = (g_Config.iLog & CONF_SAVESHADERS) ? true : false;
m_Check[2]->SetValue(bInfoLog);
m_Check[3]->SetValue(bPrimLog);
m_Check[4]->SetValue(bSaveTextures);

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

View File

@ -318,13 +318,13 @@ void Video_Prepare(void)
void Shutdown(void)
{
Fifo_Shutdown();
TextureConverter::Shutdown();
VertexLoaderManager::Shutdown();
VertexShaderCache::Shutdown();
VertexShaderManager::Shutdown();
PixelShaderManager::Shutdown();
PixelShaderCache::Shutdown();
Fifo_Shutdown();
VertexManager::Shutdown();
TextureMngr::Shutdown();
OpcodeDecoder_Shutdown();
@ -332,17 +332,16 @@ void Shutdown(void)
OpenGL_Shutdown();
}
void Video_Stop(void)
{
Fifo_Stop();
}
void Video_EnterLoop()
{
Fifo_EnterLoop(g_VideoInitialize);
}
void Video_ExitLoop()
{
Fifo_ExitLoop();
}
void DebugLog(const char* _fmt, ...)
{
#if defined(_DEBUG) || defined(DEBUGFAST)