mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
c62cbbfa97
commit
cecdc64f51
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue