Cleanups and Linux compilation fixes. :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2119 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-11-02 21:04:02 +00:00
parent a98284c3e8
commit 5b726f0b11
8 changed files with 59 additions and 63 deletions

View File

@ -39,7 +39,7 @@ namespace HostSys
void MemProtect( void* baseaddr, size_t size, PageProtectionMode mode, bool allowExecution )
{
pxAssertDev( ((size & ~__pagesize) == 0), wxsFormat(
pxAssertDev( (size & (__pagesize-1)) == 0, wxsFormat(
L"Memory block size must be a multiple of the target platform's page size.\n"
L"\tPage Size: 0x%04x (%d), Block Size: 0x%04x (%d)",
__pagesize, __pagesize, size, size )

View File

@ -804,11 +804,11 @@ static const wchar_t* TwoBytes[256] = {
// requires two bytes on input (second CAN be 0), returns unicode mapping, assigns used bytes (1/2)
wchar_t ShiftJIS_ConvertChar(const char* input, int& used)
{
int FirstByte = (unsigned char)input[0];
const uint FirstByte = input[0];
if(NumBytes[FirstByte] == 1)
{
used=1;
used = 1;
return OneByte[FirstByte];
}
else
@ -820,11 +820,11 @@ wchar_t ShiftJIS_ConvertChar(const char* input, int& used)
// print an 0xfc/0x0a combo, followed by a NULL. Other IOP prints seem to have valid
// Shift-JIS encodings. not sure what's going on yet, so this needs reviewed sometime
// --air
used = 1; return (wchar_t)input;
used = 1; return (wchar_t)FirstByte;
}
used = 2;
int SecondByte = (unsigned char)input[1];
const uint SecondByte = input[1];
return TwoBytes[FirstByte][SecondByte];
}
}

View File

@ -44,6 +44,9 @@ bool AppCoreThread::Suspend( bool isBlocking )
ScopedBusyCursor::SetDefault( Cursor_KindaBusy );
bool retval = _parent::Suspend( isBlocking );
if( !retval || isBlocking )
ScopedBusyCursor::SetDefault( Cursor_NotBusy );
// Clear the sticky key statuses, because hell knows what'll change while the PAD
// plugin is suspended.

View File

@ -40,7 +40,7 @@ using namespace Panels;
static const int s_orient = wxBK_LEFT;
#endif
static const int IdealWidth = 575;
static const int IdealWidth = 580;
template< typename T >
void Dialogs::ConfigurationDialog::AddPage( const char* label, int iconid )

View File

@ -231,8 +231,9 @@ void __evt_fastcall MainEmuFrame::OnSettingsApplied( void* obj, int& evt )
void __evt_fastcall MainEmuFrame::OnSettingsLoadSave( void* obj, IniInterface& evt )
{
if( obj == NULL ) return;
MainEmuFrame* mframe = (MainEmuFrame*)obj;
//MainEmuFrame* mframe = (MainEmuFrame*)obj;
// nothing to do here right now.
}
static int GetPluginMenuId_Settings( PluginsEnum_t pid )
@ -487,8 +488,6 @@ void MainEmuFrame::ApplyCoreStatus()
void MainEmuFrame::ApplyPluginStatus()
{
wxMenuBar& menubar( *GetMenuBar() );
if( g_plugins == NULL )
{
for( int i=0; i<PluginId_Count; ++i )
@ -503,13 +502,6 @@ void MainEmuFrame::ApplyPluginStatus()
//m_menuCDVD.SetLabel( MenuId_Src_Plugin, wxsFormat( L"%s (%s)", _("Plugin"),
// g_plugins->GetName( PluginId_CDVD ).c_str() ) );
}
// Re-populate plugin menus.
// Delete any menu options added by plugins (typically a plugin will have already
// done its own proper cleanup when the plugin was shutdown or unloaded, but lets
// not trust them, shall we?)
}
void MainEmuFrame::ApplySettings()
@ -559,6 +551,10 @@ void PerPluginMenuInfo::Populate( PluginsEnum_t pid )
// by the PCSX2 core intact.
void PerPluginMenuInfo::OnUnloaded()
{
// Delete any menu options added by plugins (typically a plugin will have already
// done its own proper cleanup when the plugin was shutdown or unloaded, but lets
// not trust them, shall we?)
MenuItemAddonList& curlist( m_PluginMenuItems );
for( uint mx=0; mx<curlist.size(); ++mx )
MyMenu.Delete( curlist[mx].Item );
@ -571,8 +567,6 @@ void PerPluginMenuInfo::OnUnloaded()
void PerPluginMenuInfo::OnLoaded()
{
MenuItemAddonList& curlist( m_PluginMenuItems );
MyMenu.SetLabel( GetPluginMenuId_Name(PluginId),
g_plugins->GetName( PluginId ) + L" " + g_plugins->GetVersion( PluginId )
);

View File

@ -242,7 +242,6 @@ void MainEmuFrame::Menu_SysReset_Click(wxCommandEvent &event)
void MainEmuFrame::Menu_ConfigPlugin_Click(wxCommandEvent &event)
{
typedef void (CALLBACK* PluginConfigureFnptr)();
const int eventId = event.GetId() - MenuId_PluginBase_Settings;
PluginsEnum_t pid = (PluginsEnum_t)(eventId / PluginMenuId_Interval);

View File

@ -29,10 +29,10 @@ Panels::BaseAdvancedCpuOptions::BaseAdvancedCpuOptions( wxWindow& parent, int id
// Clever proportions selected for a fairly nice spacing, with the third
// column serving as a buffer between static box and a pair of checkboxes.
grid.AddGrowableCol( 0, 8 );
grid.AddGrowableCol( 1, 10 );
grid.AddGrowableCol( 0, 17 );
grid.AddGrowableCol( 1, 22 );
grid.AddGrowableCol( 2, 1 );
grid.AddGrowableCol( 3, 7 );
grid.AddGrowableCol( 3, 19 );
m_StartNewRadioGroup = true;
m_Option_Round[0] = &AddRadioButton( s_round, _("Nearest") );

View File

@ -50,7 +50,7 @@ Exception::BiosLoadFailed::BiosLoadFailed( const wxString& filename, const wxStr
L"BIOS has not been configured, or the configuration has been corrupted." : msg_user
);
wxString user( msg_user.IsEmpty() ?
_("The PS2 BIOS has not been configured, or the configuration has been corrupted. Please re-configure.") : msg_user
_("The PS2 BIOS has not been configured, or the configuration has been corrupted. Please re-configure.") : msg_user.c_str()
);
BaseException::InitBaseEx( diag, user );