* Better icon! Transparency in Windows Taskbar icon is still bad, but I can't figure out how to fix it (documented in code)

* Cleaned up the code of the Gamefixes a bit.
 * More svn:native props -_-

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1788 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-09-08 16:39:37 +00:00
parent 756f8c3a15
commit 4b4422d2dc
17 changed files with 274 additions and 165 deletions

View File

@ -17,10 +17,14 @@
#include "MainFrame.h"
#include "Resources/EmbeddedImage.h"
#include "Resources/AppIcon.h"
#include "Resources/AppIcon16.h"
#include "Resources/AppIcon32.h"
#include "Resources/AppIcon64.h"
#include <wx/iconbndl.h>
#ifdef _WIN32
#include "svnrev.h"
# include "svnrev.h"
#endif
// ------------------------------------------------------------------------
@ -299,9 +303,15 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title):
SetTitle( wintitle );
wxIcon myIcon;
myIcon.CopyFromBitmap( wxBitmap( EmbeddedImage<res_AppIcon>().Rescale( 32, 32 ) ) );
SetIcon( myIcon );
// Ideally the __WXMSW__ port should use the embedded IDI_ICON2 icon, because wxWidgets sucks and
// loses the transparency information when loading bitmaps into icons. But for some reason
// I cannot get it to work despite following various examples to the letter.
wxIconBundle bundle;
bundle.AddIcon( EmbeddedImage<res_AppIcon32>().GetIcon() );
bundle.AddIcon( EmbeddedImage<res_AppIcon64>().GetIcon() );
bundle.AddIcon( EmbeddedImage<res_AppIcon16>().GetIcon() );
SetIcons( bundle );
int m_statusbar_widths[] = { (int)(backsize.GetWidth()*0.73), (int)(backsize.GetWidth()*0.25) };
m_statusbar.SetStatusWidths(2, m_statusbar_widths);

View File

@ -262,6 +262,9 @@ namespace Panels
//
class GameFixesPanel: public BaseApplicableConfigPanel
{
protected:
wxCheckBox* m_checkbox[NUM_OF_GAME_FIXES];
public:
GameFixesPanel( wxWindow& parent, int idealWidth );
void Apply( AppConfig& conf );

View File

@ -17,7 +17,6 @@
#include "ConfigurationPanels.h"
using namespace wxHelpers;
static wxCheckBox* game_fix_checkbox[NUM_OF_GAME_FIXES];
Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
BaseApplicableConfigPanel( &parent, idealWidth)
@ -26,28 +25,53 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
AddStaticText( mainSizer, _("Some games need special settings.\nEnable them here.") );
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") );
game_fix_checkbox[0] = &AddCheckBox( groupSizer, _("VU Add Hack - for Tri-Ace games!"), wxEmptyString, _("Star Ocean 3, Radiata Stories and Valkyrie Profile 2 need this.") );
game_fix_checkbox[0]->SetValue(EmuConfig.Gamefixes.VuAddSubHack);
game_fix_checkbox[1] = &AddCheckBox( groupSizer, _( "VU Clip Flag Hack - Persona games. Only for SuperVU recompiler!") );
game_fix_checkbox[1]->SetValue(EmuConfig.Gamefixes.VuClipFlagHack);
// NOTE: Oder of checkboxes must match the order of the bits in the GamefixOptions structure!
// NOTE2: Don't make this static, because translations can change at run-time :)
game_fix_checkbox[2] = &AddCheckBox( groupSizer, _("FPU Compare Hack - for Digimon Rumble Arena 2.") );
game_fix_checkbox[2]->SetValue(EmuConfig.Gamefixes.FpuCompareHack);
game_fix_checkbox[3] = &AddCheckBox( groupSizer, _("FPU Multiply Hack - for Tales of Destiny.") );
game_fix_checkbox[3]->SetValue(EmuConfig.Gamefixes.FpuMulHack);
struct CheckTextMess
{
wxString label, tooltip;
};
const CheckTextMess check_text[NUM_OF_GAME_FIXES] =
{
{
_("VU Add Hack - for Tri-Ace games!"),
_("Games that need this hack to boot:\n * Star Ocean 3\n * Radiata Stories\n * Valkyrie Profile 2")
},
{
_("VU Clip Flag Hack - for Persona games (SuperVU recompiler only!)"),
wxEmptyString
},
{
_("FPU Compare Hack - for Digimon Rumble Arena 2."),
wxEmptyString
},
{
_("FPU Multiply Hack - for Tales of Destiny."),
wxEmptyString
},
{
_("DMA Execution Hack - for Fatal Frame."),
wxEmptyString
},
{
_("VU XGkick Hack - for Erementar Gerad."),
wxEmptyString
},
{
_("MPEG Hack - for Mana Khemia 1."),
wxEmptyString
}
};
game_fix_checkbox[4] = &AddCheckBox( groupSizer, _("DMA Execution Hack - for Fatal Frame.") );
game_fix_checkbox[4]->SetValue(EmuConfig.Gamefixes.DMAExeHack);
game_fix_checkbox[5] = &AddCheckBox( groupSizer, _("VU XGkick Hack - for Erementar Gerad.") );
game_fix_checkbox[5]->SetValue(EmuConfig.Gamefixes.XgKickHack);
// I may as well add this, since these aren't hooked in yet. If the consensus is against it,
// I'll remove it.
game_fix_checkbox[6] = &AddCheckBox( groupSizer, _("MPEG Hack - for Mana Khemia 1. Not working yet!") );
game_fix_checkbox[6]->SetValue(EmuConfig.Gamefixes.MpegHack);
const Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
for( int i=0; i<NUM_OF_GAME_FIXES; ++i )
{
m_checkbox[i] = &AddCheckBox( groupSizer, check_text[i].label, wxEmptyString, check_text[i].tooltip );
m_checkbox[i]->SetValue( !!(opts.bitset & (1 << i)) );
}
mainSizer.Add( &groupSizer, wxSizerFlags().Centre() );
@ -63,11 +87,12 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
// I could still probably get rid of the for loop, but I think this is clearer.
void Panels::GameFixesPanel::Apply( AppConfig& conf )
{
Pcsx2Config::GamefixOptions& opts( conf.EmuOptions.Gamefixes );
for (int i = 0; i < NUM_OF_GAME_FIXES; i++)
{
if (game_fix_checkbox[i]->GetValue())
EmuConfig.Gamefixes.bitset |= ( 1 << i);
if (m_checkbox[i]->GetValue())
opts.bitset |= (1 << i);
else
EmuConfig.Gamefixes.bitset &= ~( 1 << i);
opts.bitset &= ~(1 << i);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -98,6 +98,13 @@ public:
return m_Image;
}
wxIcon GetIcon()
{
wxIcon retval;
retval.CopyFromBitmap( Get() );
return retval;
}
// ------------------------------------------------------------------------
// Performs a pixel resize of the loaded image and returns a new image handle (EmbeddedImage
// is left unmodified). Useful for creating ugly versions of otherwise nice graphics. Do

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -2106,11 +2106,7 @@
Name="Resources"
>
<File
RelativePath="..\..\gui\Resources\AppIcon.ico"
>
</File>
<File
RelativePath="..\..\gui\Resources\AppIcon.png"
RelativePath="..\..\gui\Resources\AppIcon16.png"
>
<FileConfiguration
Name="Debug|Win32"
@ -2127,7 +2123,7 @@
>
<Tool
Name="VCCustomBuildTool"
Description="Compiling Bitmap Resource..."
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
@ -2137,7 +2133,75 @@
>
<Tool
Name="VCCustomBuildTool"
Description="Compiling Bitmap Resource..."
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\gui\Resources\AppIcon32.png"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\gui\Resources\AppIcon64.png"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>