mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Fixed one of the two remaining crash on Stop (issue 600), and removed some setup defines which are now useless anyway.
There's an attempt to implement Peek_Color too, probably done wrong :P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3799 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -711,9 +711,7 @@ void OpenGL_Shutdown()
|
||||
|
||||
if (hDC && !ReleaseDC(EmuWindow::GetWnd(), hDC)) // Are We Able To Release The DC
|
||||
{
|
||||
#ifndef SETUP_TIMER_WAITING // This fails
|
||||
ERROR_LOG(VIDEO, "Release Device Context Failed.");
|
||||
#endif
|
||||
hDC = NULL; // Set DC To NULL
|
||||
}
|
||||
#elif defined(HAVE_X11) && HAVE_X11
|
||||
|
@ -338,8 +338,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||
}
|
||||
|
||||
case WM_DESTROY:
|
||||
//Shutdown();
|
||||
//PostQuitMessage( 0 ); // Call WM_QUIT
|
||||
Shutdown();
|
||||
break;
|
||||
|
||||
// Called when a screensaver wants to show up while this window is active
|
||||
|
@ -566,15 +566,13 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||
int srcX = (targetPixelRc.left + targetPixelRc.right) / 2;
|
||||
int srcY = (targetPixelRc.top + targetPixelRc.bottom) / 2;
|
||||
|
||||
u32 z;
|
||||
u32 z = 0;
|
||||
glReadPixels(srcX, srcY, 1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, &z);
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
if (s_MSAASamples > 1)
|
||||
{
|
||||
// Return to the EFB (this may not be necessary).
|
||||
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, s_framebufferManager.GetEFBFramebuffer());
|
||||
}
|
||||
SetFramebuffer(0);
|
||||
|
||||
// Scale the 32-bit value returned by glReadPixels to a 24-bit
|
||||
// value (GC uses a 24-bit Z-buffer).
|
||||
@ -586,7 +584,25 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||
break;
|
||||
|
||||
case PEEK_COLOR:
|
||||
// TODO: Implement
|
||||
/*{
|
||||
u32 z = 0;
|
||||
int srcX = (targetPixelRc.left + targetPixelRc.right) / 2;
|
||||
int srcY = (targetPixelRc.top + targetPixelRc.bottom) / 2;
|
||||
|
||||
if (s_MSAASamples > 1)
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, ResolveAndGetRenderTarget(efbPixelRc));
|
||||
|
||||
// Read the z value! Also adjust the pixel to read to the upscaled EFB resolution
|
||||
// Plus we need to flip the y value as the OGL image is upside down
|
||||
glReadPixels(srcX, srcY, 1, 1, GL_RGB, GL_UNSIGNED_INT, &z);
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
// We should probably re-bind the old fbo here.
|
||||
if (s_MSAASamples > 1)
|
||||
SetFramebuffer(0);
|
||||
|
||||
return z;
|
||||
}*/
|
||||
break;
|
||||
|
||||
case POKE_COLOR:
|
||||
|
@ -399,6 +399,9 @@ void Shutdown(void)
|
||||
|
||||
Fifo_Shutdown();
|
||||
PostProcessing::Shutdown();
|
||||
|
||||
// The following calls are NOT Thread Safe
|
||||
// And need to be called from the video thread
|
||||
TextureConverter::Shutdown();
|
||||
VertexLoaderManager::Shutdown();
|
||||
VertexShaderCache::Shutdown();
|
||||
@ -427,7 +430,6 @@ void Video_ExitLoop()
|
||||
|
||||
|
||||
|
||||
|
||||
// Screenshot and screen message
|
||||
|
||||
void Video_Screenshot(const char *_szFilename)
|
||||
|
Reference in New Issue
Block a user