diff options
| author | hrydgard <hrydgard@gmail.com> | 2009-09-13 10:18:01 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2009-09-13 10:18:01 +0000 |
| commit | 73d2b3e9684da5eb43280b7facbf2f31d584a75b (patch) | |
| tree | 5ab368e37a1eefb2f2153b9dbf01afef1cd155e1 /Source/Plugins | |
| parent | 2d93c654f09e86b00a14b0929f07089c137bcc05 (diff) | |
more uninteresting cleanup, fixed a minor race condition when toggling efb copy mode
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4261 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins')
5 files changed, 8 insertions, 15 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index 63c6dd042e..89e1aa525b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -65,8 +65,9 @@ bool Renderer::Init() UpdateActiveConfig(); EmuWindow::SetSize(g_Res[g_ActiveConfig.iWindowedRes][0], g_Res[g_ActiveConfig.iWindowedRes][1]); + int backbuffer_ms_mode = g_ActiveConfig.iMultisampleMode; D3D::Create(g_ActiveConfig.iAdapter, EmuWindow::GetWnd(), g_ActiveConfig.bFullscreen, - g_ActiveConfig.iFSResolution, g_ActiveConfig.iMultisampleMode); + g_ActiveConfig.iFSResolution, backbuffer_ms_mode); s_targetWidth = D3D::GetDisplayWidth(); s_targetHeight = D3D::GetDisplayHeight(); @@ -92,7 +93,6 @@ bool Renderer::Init() D3D::dev->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, 16); D3D::BeginFrame(true, 0, 1.0f); - VertexManager::BeginFrame(); return true; } @@ -308,7 +308,7 @@ void Renderer::SwapBuffers() // So let's keep it commented out. // D3D::EnableAlphaToCoverage(); - VertexManager::BeginFrame(); + UpdateViewport(); if (g_ActiveConfig.bOldCard) D3D::font.SetRenderStates(); //compatibility with low end cards diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp index 22da46a381..89e6198c3a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp @@ -101,10 +101,6 @@ void CreateDeviceObjects() { } -void BeginFrame() -{ -} - void DestroyDeviceObjects() { } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h index 6a6b70a7e3..2fcb8c0639 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h @@ -27,8 +27,6 @@ namespace VertexManager bool Init(); void Shutdown(); -void BeginFrame(); - void AddVertices(int _primitive, int _numVertices); void Flush(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index ed12005227..c1333cb771 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -595,7 +595,6 @@ void GFXConfigDialogOGL::GeneralSettingsChanged(wxCommandEvent& event) break; case ID_WIDESCREEN_HACK: g_Config.bWidescreenHack = m_WidescreenHack->IsChecked(); - Projection_SetWidescreen(g_Config.bWidescreenHack); break; case ID_VSYNC: g_Config.bVSync = m_VSync->IsChecked(); @@ -713,7 +712,6 @@ void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event) break; case ID_FREELOOK: g_Config.bFreeLook = m_FreeLook->IsChecked(); - Projection_SetFreeLook(g_Config.bFreeLook); break; case ID_TEXTUREPATH: break; @@ -731,11 +729,9 @@ void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event) g_Config.bHack = m_Hack->IsChecked(); break; case ID_RADIO_COPYEFBTORAM: - TextureMngr::ClearRenderTargets(); g_Config.bCopyEFBToRAM = true; break; case ID_RADIO_COPYEFBTOGL: - TextureMngr::ClearRenderTargets(); g_Config.bCopyEFBToRAM = false; break; case ID_PROJSTATS: @@ -784,7 +780,7 @@ void GFXConfigDialogOGL::UpdateGUI() } -void Config::UpdateProjectionHack() +void VideoConfig::UpdateProjectionHack() { ::UpdateProjectionHack(g_Config.iPhackvalue); //switch(g_Config.iPhackvalue) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 3bab443a08..09d74849c3 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -979,7 +979,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight) free(data); s_criticalScreenshot.Leave(); } else { - if(s_bLastFrameDumped && f_pFrameDump != NULL) { + if (s_bLastFrameDumped && f_pFrameDump != NULL) { fclose(f_pFrameDump); f_pFrameDump = NULL; } @@ -996,7 +996,10 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight) GL_REPORT_ERRORD(); g_Config.iSaveTargetId = 0; + bool last_copy_efb_to_ram = g_ActiveConfig.bCopyEFBToRAM; UpdateActiveConfig(); + if (last_copy_efb_to_ram != g_ActiveConfig.bCopyEFBToRAM) + TextureMngr::ClearRenderTargets(); // For testing zbuffer targets. // Renderer::SetZBufferRender(); |
