mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-11 08:40:02 +01:00
Fix dialog screenshot function on Windows
wxWidgets 3.0 seems to have a different default device context alpha channel handling on Windows, which makes the screenshot function unusable. As a incomplete fix, remove the alpha channel information from the final image on Windows. Screenshots degrade slightly.
This commit is contained in:
1 parent
c62cbbfa97
commit
cecdc64f51
1 file changed
+10
@@ -301,7 +301,17 @@ void Dialogs::BaseConfigurationDialog::OnScreenshot_Click( wxCommandEvent& evt )
|
||||
if( !filename.IsEmpty() )
|
||||
{
|
||||
ScopedBusyCursor busy( Cursor_ReallyBusy );
|
||||
#ifdef __WXMSW__
|
||||
// FIXME: Ideally the alpha channel information should be dealt with
|
||||
// at the window level. This will do until I have a comprehensive fix
|
||||
// ready.
|
||||
wxImage image = memBmp.ConvertToImage();
|
||||
if (image.HasAlpha())
|
||||
image.ClearAlpha();
|
||||
image.SaveFile( filename, wxBITMAP_TYPE_PNG );
|
||||
#else
|
||||
memBmp.SaveFile( filename, wxBITMAP_TYPE_PNG );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user