const wxBitmap& Pcsx2App::GetLogoBitmap() { ScopedPtr<wxBitmap>& logo( GetResourceCache().Bitmap_Logo ); if( logo ) return *logo; wxFileName mess; bool useTheme = (g_Conf->DeskTheme != L"default"); if( useTheme ) { wxDirName theme( PathDefs::GetThemes() + g_Conf->DeskTheme ); wxFileName zipped( theme.GetFilename() ); zipped.SetExt( L"zip" ); if( zipped.FileExists() ) { // loading theme from zipfile. //wxFileInputStream stream( zipped.ToString() ) //wxZipInputStream zstream( stream ); Console.Error( "Loading themes from zipfile is not supported yet.\nFalling back on default theme." ); } // Overrides zipfile settings (fix when zipfile support added) mess = theme.ToString(); } wxImage img; EmbeddedImage<res_BackgroundLogo> temp; // because gcc can't allow non-const temporaries. LoadImageAny( img, useTheme, mess, L"BackgroundLogo", temp ); logo = new wxBitmap( img ); return *logo; }
const wxBitmap& Pcsx2App::GetLogoBitmap() { std::unique_ptr <wxBitmap>& logo(GetResourceCache().Bitmap_Logo); if( logo ) return *logo; wxFileName themeDirectory; bool useTheme = (g_Conf->DeskTheme != L"default"); if( useTheme ) { themeDirectory.Assign(wxFileName(PathDefs::GetThemes().ToString()).GetFullPath(), g_Conf->DeskTheme); #if 0 wxFileName zipped(themeDirectory); zipped.SetExt( L"zip" ); if( zipped.FileExists() ) { // loading theme from zipfile. //wxFileInputStream stream( zipped.ToString() ) //wxZipInputStream zstream( stream ); Console.Error( "Loading themes from zipfile is not supported yet.\nFalling back on default theme." ); } #endif } wxImage img; EmbeddedImage<res_BackgroundLogo> temp; // because gcc can't allow non-const temporaries. LoadImageAny(img, useTheme, themeDirectory, L"BackgroundLogo", temp); float scale = MSW_GetDPIScale(); // 1.0 for non-Windows logo = std::unique_ptr<wxBitmap>(new wxBitmap(img.Scale(img.GetWidth() * scale, img.GetHeight() * scale, wxIMAGE_QUALITY_HIGH))); return *logo; }
const wxBitmap& Pcsx2App::GetScreenshotBitmap() { std::unique_ptr<wxBitmap>& screenshot(GetResourceCache().ScreenshotBitmap); if (screenshot) return *screenshot; wxFileName themeDirectory; bool useTheme = (g_Conf->DeskTheme != L"default"); if (useTheme) { themeDirectory.Assign(wxFileName(PathDefs::GetThemes().ToString()).GetFullPath(), g_Conf->DeskTheme); } wxImage img; EmbeddedImage<res_ButtonIcon_Camera> temp; // because gcc can't allow non-const temporaries. LoadImageAny(img, useTheme, themeDirectory, L"ButtonIcon_Camera", temp); float scale = MSW_GetDPIScale(); // 1.0 for non-Windows screenshot = std::unique_ptr<wxBitmap>(new wxBitmap(img.Scale(img.GetWidth() * scale, img.GetHeight() * scale, wxIMAGE_QUALITY_HIGH))); return *screenshot; }
const wxBitmap& Pcsx2App::GetScreenshotBitmap() { ScopedPtr<wxBitmap>& screenshot(GetResourceCache().ScreenshotBitmap); if (screenshot) return *screenshot; wxFileName mess; bool useTheme = (g_Conf->DeskTheme != L"default"); if (useTheme) { wxDirName theme(PathDefs::GetThemes() + g_Conf->DeskTheme); mess = theme.ToString(); } wxImage img; EmbeddedImage<res_ButtonIcon_Camera> temp; // because gcc can't allow non-const temporaries. LoadImageAny(img, useTheme, mess, L"ButtonIcon_Camera", temp); float scale = MSW_GetDPIScale(); // 1.0 for non-Windows screenshot = new wxBitmap(img.Scale(img.GetWidth() * scale, img.GetHeight() * scale, wxIMAGE_QUALITY_HIGH)); return *screenshot; }