diff --git a/Source/Core/DiscIO/Src/Volume.h b/Source/Core/DiscIO/Src/Volume.h index 3c606bff42..6ef7d4c608 100644 --- a/Source/Core/DiscIO/Src/Volume.h +++ b/Source/Core/DiscIO/Src/Volume.h @@ -39,7 +39,7 @@ class IVolume virtual bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0; virtual bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0; - virtual bool GetTitleID(u8* _pBuffer) const { return false; } + virtual bool GetTitleID(u8*) const { return false; } virtual std::string GetUniqueID() const = 0; virtual std::string GetMakerID() const = 0; virtual std::string GetName() const = 0; diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index aec0c72594..439188237c 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -237,9 +237,9 @@ void CGameListCtrl::Update() SetColumnWidth(COLUMN_BANNER, wxLIST_AUTOSIZE); } - AutomaticColumnWidth(); - Show(); + + AutomaticColumnWidth(); } wxString NiceSizeFormat(s64 _size) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp index 7da020485c..dfa80a31d8 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp @@ -240,17 +240,6 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr plocal = strstr(plocal+13, "program.local"); } - if (Renderer::IsUsingATIDrawBuffers()) { - // Sometimes compilation can use ARB_draw_buffers, which would fail for ATI cards. - // Replace the three characters ARB with ATI. TODO - check whether this is fixed in modern ATI drivers. - char *poptions = strstr(pcompiledprog, "ARB_draw_buffers"); - if (poptions != NULL) { - poptions[0] = 'A'; - poptions[1] = 'T'; - poptions[2] = 'I'; - } - } - glGenProgramsARB(1, &ps.glprogid); glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, ps.glprogid); glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(pcompiledprog), pcompiledprog); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index fe42921ee3..5b0e090e69 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -70,8 +70,6 @@ #include "Win32Window.h" // warning: crapcode #else #endif -////////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////////////////// // Declarations and definitions @@ -126,7 +124,6 @@ static GLuint s_DepthBuffer = 0; static GLuint s_ResolvedRenderTarget = 0; static GLuint s_ResolvedDepthTarget = 0; -static bool s_bATIDrawBuffers = false; static bool s_bHaveStencilBuffer = false; static bool s_bHaveFramebufferBlit = false; static bool s_bHaveCoverageMSAA = false; @@ -238,10 +235,6 @@ bool Renderer::Init() (const char*)glGetString(GL_RENDERER), (const char*)glGetString(GL_VERSION)).c_str(), 5000); - // Checks if it ONLY has the ATI_draw_buffers extension, some have both - if (GLEW_ATI_draw_buffers && !GLEW_ARB_draw_buffers) - s_bATIDrawBuffers = true; - s_bFullscreen = g_Config.bFullscreen; glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &numvertexattribs); @@ -732,13 +725,6 @@ void Renderer::SetBlendMode(bool forceUpdate) s_blendMode = newval; } -bool Renderer::IsUsingATIDrawBuffers() -{ - return s_bATIDrawBuffers; -} -////////////////////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////////////////////// // Function: This function handles the OpenGL glScissor() function // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ @@ -793,8 +779,6 @@ bool Renderer::SetScissorRect() return false; } -////////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////////////////// // Aspect ratio functions @@ -1336,53 +1320,64 @@ bool Renderer::SaveRenderTarget(const char *filename, int W, int H, int YOffset) { // The height seemed to be one less than the setting sometimes (and sometimes not), // perhaps a rounding error - if (H == 479) H = 480; - if (H == 599) H = 600; - if (H == 767) H = 768; - if (H == 959) H = 960; - if (H == 1023) H = 1024; + if (H & 1) + H++; u8 *data = (u8 *)malloc(3 * W * H); glPixelStorei(GL_PACK_ALIGNMENT, 1); glReadPixels(0, YOffset, W, H, GL_RGB, GL_UNSIGNED_BYTE, data); + // Show failure message if (glGetError() != GL_NO_ERROR) { OSD::AddMessage("Error capturing or saving screenshot.", 2000); return false; } + // Turn image upside down FlipImageData(data, W, H); + #if defined(HAVE_WX) && HAVE_WX // Create wxImage wxImage a(W, H, data); - // --------------------------------------------------------------------- - // If it's not a 4:3 picture rescale it to 4:3. For example in RE1 some native pictures - // have non-4:3 resolutions. This only applies to native resolutions. - // ŻŻŻŻŻŻŻŻŻŻŻŻŻ - // Todo: There is currently no adjustment for non-16:9 source pictures that are intended for a 16:9 - // size because I think all Wii 16:9 source pictures are 16:9 to begin with. If not, add a 16:9 adjustment - // too. - // ŻŻŻŻŻŻŻŻŻŻŻŻŻ - float Ratio = (float)W / (float)(H); - if (g_Config.bNativeResolution && s_MSAASamples == 1 && !g_Config.bWireFrame - && Ratio != 4.0/3.0 && Ratio != 16.0/9.0) + int nW, nH; + + // Resize the output to correctly use the Aspect ratio setting + // This way, games are saved using the correct A/R scaling + + if ((g_Config.bKeepAR169 || g_Config.bKeepAR43) && s_MSAASamples == 1 && !g_Config.bWireFrame) { + float Ratio = (float)W / (float)H; + // Check if the height or width should be changed - if (Ratio < 4.0/3.0) + if (Ratio != 4.0f/3.0f && g_Config.bKeepAR43) { + // Change the A/R to 4/3 float fW = (float)W * 4.0/3.0; - W = (int)fW; + nW = (int)floor(fW); + float fH = fW * 3.0/4.0; + nH = (int)floor(fH); + + // Then rescale the width + W = nW * H / nH; + H = nH * H / nH; } - else + if (Ratio != 16.0/9.0 && g_Config.bKeepAR169) { - float fH = (float)W * 3.0/4.0; - H = (int)fH; + // Change the A/R to 16/9 + float fW = (float)W * 16.0/9.0; + nW = (int)floor(fW); + float fH = fW * 9.0/16.0; + nH = (int)floor(fH); + + // Then rescale the height + W = nW * W / nW; + H = nH * W / nW; } + a.Rescale(W, H, wxIMAGE_QUALITY_HIGH); - } - // --------------------------------------------------------------------- + } a.SaveFile(wxString::FromAscii(filename), wxBITMAP_TYPE_BMP); bool result = true; @@ -1483,4 +1478,4 @@ void UpdateViewport() DEBUG_LOG(CONSOLE, "----------------------------------------------------------------"); */ } -////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file + diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.h b/Source/Plugins/Plugin_VideoOGL/Src/Render.h index 9eadde5ef7..7178ad612e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.h @@ -54,7 +54,6 @@ public: static void SwapBuffers(); - static bool IsUsingATIDrawBuffers(); static bool IsBlack(); static void SetColorMask(); static void SetBlendMode(bool forceUpdate);