mirror of https://github.com/PCSX2/pcsx2.git
Lots of wee bugfixes to user interface stuffs
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2199 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
a4baab103f
commit
dd0b49e80d
|
@ -32,7 +32,7 @@ extern const wxRect wxDefaultRect;
|
|||
// This should prove useful....
|
||||
#define wxsFormat wxString::Format
|
||||
|
||||
extern void SplitString( wxArrayString& dest, const wxString& src, const wxString& delims );
|
||||
extern void SplitString( wxArrayString& dest, const wxString& src, const wxString& delims, wxStringTokenizerMode mode = wxTOKEN_RET_EMPTY_ALL );
|
||||
extern void JoinString( wxString& dest, const wxArrayString& src, const wxString& separator );
|
||||
|
||||
extern wxString ToString( const wxPoint& src, const wxString& separator=L"," );
|
||||
|
|
|
@ -84,7 +84,6 @@ protected:
|
|||
ButtonObjArray m_objects;
|
||||
|
||||
bool m_IsRealized;
|
||||
int m_idealWidth;
|
||||
|
||||
wxSize m_padding;
|
||||
int m_Indentation;
|
||||
|
@ -92,14 +91,14 @@ protected:
|
|||
public:
|
||||
template< int size >
|
||||
pxRadioPanel( wxPanelWithHelpers* parent, const RadioPanelItem (&src)[size] )
|
||||
: wxPanelWithHelpers( parent, parent->GetIdealWidth() )
|
||||
: wxPanelWithHelpers( parent, parent->GetIdealWidth()-24 )
|
||||
{
|
||||
Init( src, size );
|
||||
}
|
||||
|
||||
template< int size >
|
||||
pxRadioPanel( wxDialogWithHelpers* parent, const RadioPanelItem (&src)[size] )
|
||||
: wxDialogWithHelpers( parent, parent->GetIdealWidth() )
|
||||
: wxDialogWithHelpers( parent, parent->GetIdealWidth()-24 )
|
||||
{
|
||||
Init( src, size );
|
||||
}
|
||||
|
@ -112,13 +111,13 @@ public:
|
|||
}
|
||||
|
||||
pxRadioPanel( wxPanelWithHelpers* parent )
|
||||
: wxPanelWithHelpers( parent, parent->GetIdealWidth() )
|
||||
: wxPanelWithHelpers( parent, parent->GetIdealWidth()-24 )
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
pxRadioPanel( wxDialogWithHelpers* parent )
|
||||
: wxPanelWithHelpers( parent, parent->GetIdealWidth() )
|
||||
: wxPanelWithHelpers( parent, parent->GetIdealWidth()-24 )
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ void SplitString( SafeList<wxString>& dest, const wxString& src, const wxString&
|
|||
dest.Add( parts.GetNextToken() );
|
||||
}
|
||||
|
||||
void SplitString( wxArrayString& dest, const wxString& src, const wxString& delims )
|
||||
void SplitString( wxArrayString& dest, const wxString& src, const wxString& delims, wxStringTokenizerMode mode )
|
||||
{
|
||||
wxStringTokenizer parts( src, delims );
|
||||
wxStringTokenizer parts( src, delims, mode );
|
||||
while( parts.HasMoreTokens() )
|
||||
dest.Add( parts.GetNextToken() );
|
||||
}
|
||||
|
|
|
@ -59,6 +59,8 @@ void pxRadioPanel::Reset()
|
|||
|
||||
void pxRadioPanel::Realize()
|
||||
{
|
||||
//if( )
|
||||
|
||||
const int numbuttons = m_buttonStrings.size();
|
||||
if( numbuttons == 0 ) return;
|
||||
if( m_IsRealized ) return;
|
||||
|
@ -82,7 +84,7 @@ void pxRadioPanel::Realize()
|
|||
m_objects[i].SubTextObj = NULL;
|
||||
if( m_buttonStrings[i].SubText.IsEmpty() ) continue;
|
||||
m_objects[i].SubTextObj = new wxStaticText( this, wxID_ANY, m_buttonStrings[i].SubText );
|
||||
if( (m_idealWidth > 0) && pxAssertMsg( m_idealWidth < 40, "Unusably short text wrapping specified!" ) )
|
||||
if( (m_idealWidth > 0) && pxAssertMsg( m_idealWidth > 40, "Unusably short text wrapping specified!" ) )
|
||||
m_objects[i].SubTextObj->Wrap( m_idealWidth - m_Indentation );
|
||||
}
|
||||
|
||||
|
|
|
@ -695,12 +695,12 @@ PluginManager::PluginManager( const wxString (&folders)[PluginId_Count] )
|
|||
|
||||
// Fetch plugin name and version information
|
||||
|
||||
_PS2EgetLibName GetLibName = (_PS2EgetLibName)m_info[pid].Lib.GetSymbol( L"PS2EgetLibName" );
|
||||
_PS2EgetLibVersion2 GetLibVersion2 = (_PS2EgetLibVersion2)m_info[pid].Lib.GetSymbol( L"PS2EgetLibVersion2" );
|
||||
_PS2EgetLibName GetLibName = (_PS2EgetLibName) m_info[pid].Lib.GetSymbol( L"PS2EgetLibName" );
|
||||
_PS2EgetLibVersion2 GetLibVersion2 = (_PS2EgetLibVersion2) m_info[pid].Lib.GetSymbol( L"PS2EgetLibVersion2" );
|
||||
|
||||
if( GetLibName == NULL || GetLibVersion2 == NULL )
|
||||
throw Exception::PluginLoadError( pid, m_info[pid].Filename,
|
||||
wxsFormat( L"\nMethod binding failure on GetLibName or GetLibVersion2.\n" ),
|
||||
L"\nMethod binding failure on GetLibName or GetLibVersion2.\n",
|
||||
_( "Configured plugin is not a PCSX2 plugin, or is for an older unsupported version of PCSX2." )
|
||||
);
|
||||
|
||||
|
@ -715,8 +715,16 @@ PluginManager::PluginManager( const wxString (&folders)[PluginId_Count] )
|
|||
BindRequired( pid );
|
||||
BindOptional( pid );
|
||||
|
||||
// Bind Optional Functions
|
||||
// (leave pointer null and do not generate error)
|
||||
// Run Plugin's Functionality Test.
|
||||
// A lot of plugins don't bother to implement this function and return 0 (success)
|
||||
// regardless, but some do so let's go ahead and check it. I mean, we're supposed to. :)
|
||||
|
||||
int testres = m_info[pi->id].CommonBindings.Test();
|
||||
if( testres != 0 )
|
||||
throw Exception::PluginLoadError( pid, m_info[pid].Filename,
|
||||
wxsFormat( L"Plugin Test failure, return code: %d", testres ),
|
||||
_( "The plugin reports that your hardware or software/drivers are not supported." )
|
||||
);
|
||||
} while( ++pi, pi->shortname != NULL );
|
||||
|
||||
CDVDapi_Plugin.newDiskCB( cdvdNewDiskCB );
|
||||
|
|
|
@ -57,7 +57,7 @@ void SysDetect()
|
|||
L"Cores = %d physical [%d logical]\n"
|
||||
L"x86PType = %s\n"
|
||||
L"x86Flags = %8.8x %8.8x\n"
|
||||
L"x86EFlags = %8.8x\n",
|
||||
L"x86EFlags = %8.8x",
|
||||
fromUTF8( x86caps.VendorName ).c_str(), x86caps.StepID,
|
||||
fromUTF8( x86caps.FamilyName ).Trim().Trim(false).c_str(),
|
||||
x86caps.Speed / 1000, x86caps.Speed % 1000,
|
||||
|
@ -67,6 +67,8 @@ void SysDetect()
|
|||
x86caps.EFlags
|
||||
);
|
||||
|
||||
Console.Newline();
|
||||
|
||||
wxArrayString features[2]; // 2 lines, for readability!
|
||||
|
||||
if( x86caps.hasMultimediaExtensions ) features[0].Add( L"MMX" );
|
||||
|
@ -87,8 +89,7 @@ void SysDetect()
|
|||
JoinString( result[1], features[1], L".. " );
|
||||
|
||||
Console.WriteLn( Color_StrongBlack, L"x86 Features Detected:" );
|
||||
Console.Indent().WriteLn( result[0] + (result[1].IsEmpty() ? L"" : (L"\n" + result[1])) + L"\n" );
|
||||
|
||||
Console.Indent().WriteLn( result[0] + (result[1].IsEmpty() ? L"" : (L"\n" + result[1])) );
|
||||
Console.Newline();
|
||||
}
|
||||
|
||||
|
|
|
@ -305,6 +305,28 @@ struct AppImageIds
|
|||
} Toolbars;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
// pxAppResources
|
||||
// -------------------------------------------------------------------------------------------
|
||||
// Container class for resources that should (or must) be unloaded prior to the ~wxApp() destructor.
|
||||
// (typically this object is deleted at OnExit() or just prior to OnExit()).
|
||||
//
|
||||
struct pxAppResources
|
||||
{
|
||||
AppImageIds ImageId;
|
||||
|
||||
ScopedPtr<wxImageList> ConfigImages;
|
||||
ScopedPtr<wxImageList> ToolbarImages;
|
||||
ScopedPtr<wxIconBundle> IconBundle;
|
||||
ScopedPtr<wxBitmap> Bitmap_Logo;
|
||||
|
||||
ScopedPtr<wxMenu> RecentIsoMenu;
|
||||
ScopedPtr<RecentIsoManager> RecentIsoList;
|
||||
|
||||
pxAppResources();
|
||||
~pxAppResources() throw() { }
|
||||
};
|
||||
|
||||
struct MsgboxEventResult
|
||||
{
|
||||
Semaphore WaitForMe;
|
||||
|
@ -363,15 +385,10 @@ public:
|
|||
AcceleratorDictionary GlobalAccels;
|
||||
|
||||
protected:
|
||||
wxImageList m_ConfigImages;
|
||||
|
||||
ScopedPtr<wxImageList> m_ToolbarImages;
|
||||
ScopedPtr<wxBitmap> m_Bitmap_Logo;
|
||||
ScopedPtr<PipeRedirectionBase> m_StdoutRedirHandle;
|
||||
ScopedPtr<PipeRedirectionBase> m_StderrRedirHandle;
|
||||
|
||||
ScopedPtr<wxMenu> m_RecentIsoMenu;
|
||||
ScopedPtr<RecentIsoList> m_RecentIsoList;
|
||||
ScopedPtr<pxAppResources> m_Resources;
|
||||
|
||||
public:
|
||||
ScopedPtr<SysCoreAllocations> m_CoreAllocs;
|
||||
|
@ -384,9 +401,6 @@ protected:
|
|||
GSFrame* m_gsFrame;
|
||||
ConsoleLogFrame* m_ProgramLogBox;
|
||||
|
||||
bool m_ConfigImagesAreLoaded;
|
||||
AppImageIds m_ImageId;
|
||||
|
||||
public:
|
||||
Pcsx2App();
|
||||
virtual ~Pcsx2App();
|
||||
|
@ -402,14 +416,6 @@ public:
|
|||
void SysExecute( CDVD_SourceType cdvdsrc, const wxString& elf_override=wxEmptyString );
|
||||
void SysReset();
|
||||
|
||||
const wxBitmap& GetLogoBitmap();
|
||||
wxImageList& GetImgList_Config();
|
||||
wxImageList& GetImgList_Toolbars();
|
||||
|
||||
const AppImageIds& GetImgId() const { return m_ImageId; }
|
||||
wxMenu& GetRecentIsoMenu() { return *m_RecentIsoMenu; }
|
||||
RecentIsoList& GetRecentIsoList() { return *m_RecentIsoList; }
|
||||
|
||||
MainEmuFrame& GetMainFrame() const;
|
||||
MainEmuFrame* GetMainFramePtr() const { return m_MainFrame; }
|
||||
bool HasMainFrame() const { return m_MainFrame != NULL; }
|
||||
|
@ -418,6 +424,24 @@ public:
|
|||
void OnGsFrameClosed();
|
||||
void OnMainFrameClosed();
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// App-wide Resources
|
||||
// --------------------------------------------------------------------------
|
||||
// All of these accessors cache the resources on first use and retain them in
|
||||
// memory until the program exits.
|
||||
|
||||
wxMenu& GetRecentIsoMenu();
|
||||
RecentIsoManager& GetRecentIsoList();
|
||||
const wxIconBundle& GetIconBundle();
|
||||
const wxBitmap& GetLogoBitmap();
|
||||
wxImageList& GetImgList_Config();
|
||||
wxImageList& GetImgList_Toolbars();
|
||||
|
||||
const AppImageIds& GetImgId() const
|
||||
{
|
||||
return m_Resources->ImageId;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Overrides of wxApp virtuals:
|
||||
// --------------------------------------------------------------------------
|
||||
|
|
|
@ -266,15 +266,13 @@ bool Pcsx2App::OnInit()
|
|||
InitDefaultGlobalAccelerators();
|
||||
delete wxLog::SetActiveTarget( new pxLogConsole() );
|
||||
|
||||
m_RecentIsoMenu = new wxMenu();
|
||||
m_RecentIsoMenu->Append( MenuId_IsoBrowse, _("Browse..."), _("Browse for an Iso that is not in your recent history.") );
|
||||
m_RecentIsoList = new RecentIsoList( m_RecentIsoMenu );
|
||||
m_Resources = new pxAppResources();
|
||||
|
||||
ReadUserModeSettings();
|
||||
AppConfig_OnChangedSettingsFolder();
|
||||
|
||||
m_MainFrame = new MainEmuFrame( NULL, L"PCSX2" );
|
||||
m_MainFrame->PushEventHandler( m_RecentIsoList );
|
||||
m_MainFrame->PushEventHandler( &GetRecentIsoList() );
|
||||
|
||||
if( m_ProgramLogBox )
|
||||
{
|
||||
|
@ -294,7 +292,7 @@ bool Pcsx2App::OnInit()
|
|||
SysDetect();
|
||||
AppApplySettings();
|
||||
|
||||
#ifdef __WIN32__
|
||||
#ifdef __WXMSW__
|
||||
extern void SetupDwmStuff(WXHWND hMainWindow);
|
||||
SetupDwmStuff(m_MainFrame->GetHWND());
|
||||
#endif
|
||||
|
@ -398,16 +396,12 @@ void Pcsx2App::CleanupMess()
|
|||
delete wxGetLocale();
|
||||
}
|
||||
|
||||
Pcsx2App::Pcsx2App() :
|
||||
m_MainFrame( NULL )
|
||||
, m_gsFrame( NULL )
|
||||
, m_ProgramLogBox( NULL )
|
||||
, m_ConfigImages( 32, 32 )
|
||||
, m_ConfigImagesAreLoaded( false )
|
||||
, m_ToolbarImages( NULL )
|
||||
, m_Bitmap_Logo( NULL )
|
||||
, m_RecentIsoMenu( NULL )
|
||||
Pcsx2App::Pcsx2App()
|
||||
{
|
||||
m_MainFrame = NULL;
|
||||
m_gsFrame = NULL;
|
||||
m_ProgramLogBox = NULL;
|
||||
|
||||
SetAppName( L"pcsx2" );
|
||||
BuildCommandHash();
|
||||
}
|
||||
|
|
|
@ -365,10 +365,9 @@ int Pcsx2App::OnExit()
|
|||
if( g_Conf )
|
||||
AppSaveSettings();
|
||||
|
||||
sMainFrame.RemoveEventHandler( m_RecentIsoList );
|
||||
sMainFrame.RemoveEventHandler( &GetRecentIsoList() );
|
||||
|
||||
m_RecentIsoList = NULL;
|
||||
m_RecentIsoMenu = NULL;
|
||||
m_Resources = NULL;
|
||||
|
||||
return wxApp::OnExit();
|
||||
}
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
#include "Resources/ConfigIcon_Paths.h"
|
||||
#include "Resources/ConfigIcon_Plugins.h"
|
||||
|
||||
#include "Resources/AppIcon16.h"
|
||||
#include "Resources/AppIcon32.h"
|
||||
#include "Resources/AppIcon64.h"
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
const wxImage& LoadImageAny(
|
||||
wxImage& dest, bool useTheme, wxFileName& base, const wxChar* filename, IEmbeddedImage& onFail )
|
||||
|
@ -59,11 +63,48 @@ const wxImage& LoadImageAny(
|
|||
return dest = onFail.Get();
|
||||
}
|
||||
|
||||
pxAppResources::pxAppResources()
|
||||
{
|
||||
}
|
||||
|
||||
wxMenu& Pcsx2App::GetRecentIsoMenu()
|
||||
{
|
||||
if( !m_Resources->RecentIsoMenu )
|
||||
{
|
||||
m_Resources->RecentIsoMenu = new wxMenu();
|
||||
m_Resources->RecentIsoMenu->Append( MenuId_IsoBrowse, _("Browse..."), _("Browse for an Iso that is not in your recent history.") );
|
||||
}
|
||||
|
||||
return *m_Resources->RecentIsoMenu;
|
||||
}
|
||||
|
||||
RecentIsoManager& Pcsx2App::GetRecentIsoList()
|
||||
{
|
||||
if( !m_Resources->RecentIsoList )
|
||||
m_Resources->RecentIsoList = new RecentIsoManager( &GetRecentIsoMenu() );
|
||||
|
||||
return *m_Resources->RecentIsoList;
|
||||
}
|
||||
|
||||
const wxIconBundle& Pcsx2App::GetIconBundle()
|
||||
{
|
||||
ScopedPtr<wxIconBundle>& bundle( m_Resources->IconBundle );
|
||||
if( !bundle )
|
||||
{
|
||||
bundle = new wxIconBundle();
|
||||
bundle->AddIcon( EmbeddedImage<res_AppIcon32>().GetIcon() );
|
||||
bundle->AddIcon( EmbeddedImage<res_AppIcon64>().GetIcon() );
|
||||
bundle->AddIcon( EmbeddedImage<res_AppIcon16>().GetIcon() );
|
||||
}
|
||||
|
||||
return *bundle;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
const wxBitmap& Pcsx2App::GetLogoBitmap()
|
||||
{
|
||||
if( m_Bitmap_Logo )
|
||||
return *m_Bitmap_Logo;
|
||||
ScopedPtr<wxBitmap>& logo( m_Resources->Bitmap_Logo );
|
||||
if( logo ) return *logo;
|
||||
|
||||
wxFileName mess;
|
||||
bool useTheme = (g_Conf->DeskTheme != L"default");
|
||||
|
@ -90,16 +131,18 @@ const wxBitmap& Pcsx2App::GetLogoBitmap()
|
|||
wxImage img;
|
||||
EmbeddedImage<res_BackgroundLogo> temp; // because gcc can't allow non-const temporaries.
|
||||
LoadImageAny( img, useTheme, mess, L"BackgroundLogo", temp );
|
||||
m_Bitmap_Logo = new wxBitmap( img );
|
||||
logo = new wxBitmap( img );
|
||||
|
||||
return *m_Bitmap_Logo;
|
||||
return *logo;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
wxImageList& Pcsx2App::GetImgList_Config()
|
||||
{
|
||||
if( !m_ConfigImagesAreLoaded )
|
||||
ScopedPtr<wxImageList>& images( m_Resources->ConfigImages );
|
||||
if( !images )
|
||||
{
|
||||
images = new wxImageList(32, 32);
|
||||
wxFileName mess;
|
||||
bool useTheme = (g_Conf->DeskTheme != L"default");
|
||||
|
||||
|
@ -111,14 +154,14 @@ wxImageList& Pcsx2App::GetImgList_Config()
|
|||
|
||||
wxImage img;
|
||||
|
||||
// GCC Specific: wxT() macro is required when using string token pasting. For some reason L
|
||||
// generates syntax errors. >_<
|
||||
// GCC Specific: wxT() macro is required when using string token pasting. For some
|
||||
// reason L generates syntax errors. >_<
|
||||
|
||||
#undef FancyLoadMacro
|
||||
#define FancyLoadMacro( name ) \
|
||||
{ \
|
||||
EmbeddedImage<res_ConfigIcon_##name> temp( g_Conf->Listbook_ImageSize, g_Conf->Listbook_ImageSize ); \
|
||||
m_ImageId.Config.name = m_ConfigImages.Add( LoadImageAny( \
|
||||
m_Resources->ImageId.Config.name = images->Add( LoadImageAny( \
|
||||
img, useTheme, mess, L"ConfigIcon_" wxT(#name), temp ) \
|
||||
); \
|
||||
}
|
||||
|
@ -130,17 +173,18 @@ wxImageList& Pcsx2App::GetImgList_Config()
|
|||
FancyLoadMacro( Video );
|
||||
FancyLoadMacro( Cpu );
|
||||
}
|
||||
m_ConfigImagesAreLoaded = true;
|
||||
return m_ConfigImages;
|
||||
return *images;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
wxImageList& Pcsx2App::GetImgList_Toolbars()
|
||||
{
|
||||
if( !m_ToolbarImages )
|
||||
ScopedPtr<wxImageList>& images( m_Resources->ToolbarImages );
|
||||
|
||||
if( !images )
|
||||
{
|
||||
const int imgSize = g_Conf->Toolbar_ImageSize ? 64 : 32;
|
||||
m_ToolbarImages = new wxImageList( imgSize, imgSize );
|
||||
images = new wxImageList( imgSize, imgSize );
|
||||
wxFileName mess;
|
||||
bool useTheme = (g_Conf->DeskTheme != L"default");
|
||||
|
||||
|
@ -155,10 +199,10 @@ wxImageList& Pcsx2App::GetImgList_Toolbars()
|
|||
#define FancyLoadMacro( name ) \
|
||||
{ \
|
||||
EmbeddedImage<res_ToolbarIcon_##name> temp( imgSize, imgSize ); \
|
||||
m_ImageId.Toolbars.name = m_ConfigImages.Add( LoadImageAny( img, useTheme, mess, L"ToolbarIcon" wxT(#name), temp ) ); \
|
||||
m_Resources.ImageId.Toolbars.name = images->Add( LoadImageAny( img, useTheme, mess, L"ToolbarIcon" wxT(#name), temp ) ); \
|
||||
}
|
||||
|
||||
}
|
||||
return *m_ToolbarImages;
|
||||
return *images;
|
||||
}
|
||||
|
||||
|
|
|
@ -237,26 +237,28 @@ enum MenuIDs_t
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, AppConfig::ConsoleLogOptions& options ) :
|
||||
wxFrame(parent, wxID_ANY, title)
|
||||
, m_conf( options )
|
||||
, m_TextCtrl( *new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, AppConfig::ConsoleLogOptions& options )
|
||||
: wxFrame(parent, wxID_ANY, title)
|
||||
, m_conf( options )
|
||||
, m_TextCtrl( *new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxHSCROLL | wxTE_READONLY | wxTE_RICH2 ) )
|
||||
, m_ColorTable( options.FontSize )
|
||||
, m_ColorTable( options.FontSize )
|
||||
|
||||
, m_pendingFlushes( 0 )
|
||||
, m_WaitingThreadsForFlush( 0 )
|
||||
, m_QueueColorSection( L"ConsoleLog::QueueColorSection" )
|
||||
, m_QueueBuffer( L"ConsoleLog::QueueBuffer" )
|
||||
, m_CurQueuePos( false )
|
||||
|
||||
, m_ThawThrottle( 0 )
|
||||
, m_ThawNeeded( false )
|
||||
, m_ThawPending( false )
|
||||
|
||||
, m_QueueColorSection( L"ConsoleLog::QueueColorSection" )
|
||||
, m_QueueBuffer( L"ConsoleLog::QueueBuffer" )
|
||||
, m_CurQueuePos( false )
|
||||
|
||||
, m_threadlogger( EnableThreadedLoggingTest ? new ConsoleTestThread() : NULL )
|
||||
, m_threadlogger( EnableThreadedLoggingTest ? new ConsoleTestThread() : NULL )
|
||||
{
|
||||
m_pendingFlushes = 0;
|
||||
m_WaitingThreadsForFlush = 0;
|
||||
|
||||
m_ThawThrottle = 0;
|
||||
m_ThawNeeded = false;
|
||||
m_ThawPending = false;
|
||||
|
||||
SetIcons( wxGetApp().GetIconBundle() );
|
||||
|
||||
m_TextCtrl.SetBackgroundColour( wxColor( 230, 235, 242 ) );
|
||||
m_TextCtrl.SetDefaultStyle( m_ColorTable[DefaultConsoleColor] );
|
||||
|
||||
|
@ -722,6 +724,7 @@ static void __concall ConsoleToWindow_Newline()
|
|||
template< const IConsoleWriter& secondary >
|
||||
static void __concall ConsoleToWindow_DoWrite( const wxString& fmt )
|
||||
{
|
||||
if( secondary.DoWrite != NULL )
|
||||
secondary.DoWrite( fmt );
|
||||
((Pcsx2App&)*wxTheApp).GetProgramLog()->Write( Console.GetColor(), fmt );
|
||||
}
|
||||
|
@ -729,6 +732,7 @@ static void __concall ConsoleToWindow_DoWrite( const wxString& fmt )
|
|||
template< const IConsoleWriter& secondary >
|
||||
static void __concall ConsoleToWindow_DoWriteLn( const wxString& fmt )
|
||||
{
|
||||
if( secondary.DoWriteLn != NULL )
|
||||
secondary.DoWriteLn( fmt );
|
||||
((Pcsx2App&)*wxTheApp).GetProgramLog()->Write( Console.GetColor(), fmt + L"\n" );
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ void GSFrame::InitDefaultAccelerators()
|
|||
GSFrame::GSFrame(wxWindow* parent, const wxString& title):
|
||||
wxFrame(parent, wxID_ANY, title, wxDefaultPosition, wxSize( 640, 480 ), wxDEFAULT_FRAME_STYLE )
|
||||
{
|
||||
SetIcons( wxGetApp().GetIconBundle() );
|
||||
|
||||
InitDefaultAccelerators();
|
||||
//new wxStaticText( "" );
|
||||
|
||||
|
|
|
@ -20,11 +20,6 @@
|
|||
#include "Dialogs/ModalPopups.h"
|
||||
#include "IsoDropTarget.h"
|
||||
|
||||
#include "Resources/EmbeddedImage.h"
|
||||
#include "Resources/AppIcon16.h"
|
||||
#include "Resources/AppIcon32.h"
|
||||
#include "Resources/AppIcon64.h"
|
||||
|
||||
#include <wx/iconbndl.h>
|
||||
|
||||
#if _MSC_VER
|
||||
|
@ -314,11 +309,8 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title):
|
|||
// 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 );
|
||||
|
||||
SetIcons( wxGetApp().GetIconBundle() );
|
||||
|
||||
int m_statusbar_widths[] = { (int)(backsize.GetWidth()*0.73), (int)(backsize.GetWidth()*0.25) };
|
||||
m_statusbar.SetStatusWidths(2, m_statusbar_widths);
|
||||
|
|
|
@ -77,13 +77,13 @@ Panels::BaseAdvancedCpuOptions::BaseAdvancedCpuOptions( wxWindow& parent, int id
|
|||
|
||||
SetSizer( &s_adv );
|
||||
|
||||
Connect( wxID_DEFAULT, wxCommandEventHandler( BaseAdvancedCpuOptions::OnRestoreDefaults ) );
|
||||
Connect( wxID_DEFAULT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BaseAdvancedCpuOptions::OnRestoreDefaults ) );
|
||||
}
|
||||
|
||||
void Panels::BaseAdvancedCpuOptions::OnRestoreDefaults(wxCommandEvent &evt)
|
||||
{
|
||||
m_RoundModePanel->SetSelection( 3 );
|
||||
m_ClampModePanel->SetSelection( 0 );
|
||||
m_RoundModePanel->SetSelection( 3 ); // Roundmode chop
|
||||
m_ClampModePanel->SetSelection( 1 ); // clamp mode normal
|
||||
|
||||
m_Option_DAZ->SetValue(true);
|
||||
m_Option_FTZ->SetValue(true);
|
||||
|
|
|
@ -126,7 +126,8 @@ void Panels::eeLogOptionsPanel::OnSettingsChanged()
|
|||
{
|
||||
const TraceLogFilters& conf( g_Conf->EmuOptions.Trace );
|
||||
|
||||
this->SetValue( conf.EE.m_EnableAll );
|
||||
SetValue( conf.EE.m_EnableAll );
|
||||
|
||||
m_disasmPanel->SetValue( conf.EE.m_EnableDisasm );
|
||||
m_evtPanel->SetValue( conf.EE.m_EnableEvents );
|
||||
m_hwPanel->SetValue( conf.EE.m_EnableHardware );
|
||||
|
@ -160,6 +161,7 @@ void Panels::iopLogOptionsPanel::OnSettingsChanged()
|
|||
const TraceLogFilters& conf( g_Conf->EmuOptions.Trace );
|
||||
|
||||
SetValue( conf.IOP.m_EnableAll );
|
||||
|
||||
m_disasmPanel->SetValue( conf.IOP.m_EnableDisasm );
|
||||
m_evtPanel->SetValue( conf.IOP.m_EnableEvents );
|
||||
m_hwPanel->SetValue( conf.IOP.m_EnableHardware );
|
||||
|
@ -201,12 +203,11 @@ Panels::LogOptionsPanel::LogOptionsPanel(wxWindow* parent, int idealWidth )
|
|||
m_masterEnabler->SetToolTip( _("On-the-fly hotkey support: Toggle trace logging at any time using F10.") );
|
||||
|
||||
s_misc.Add( m_SIF = new pxCheckBox( this, L"SIF (EE<->IOP)" ));
|
||||
m_SIF->SetToolTip(_("Enables logging of both SIF DMAs and SIF Register activity.") );
|
||||
|
||||
s_misc.Add( m_VIFunpack = new pxCheckBox( this, L"VIFunpack" ));
|
||||
m_VIFunpack->SetToolTip(_("Special detailed logs of VIF packed data handling (does not include VIF control, status, or hwRegs)"));
|
||||
|
||||
s_misc.Add( m_GIFtag = new pxCheckBox( this, L"GIFtag" ));
|
||||
|
||||
m_SIF->SetToolTip(_("Enables logging of both SIF DMAs and SIF Register activity.") );
|
||||
m_VIFunpack->SetToolTip(_("Special detailed logs of VIF packed data handling (does not include VIF control, status, or hwRegs)"));
|
||||
m_GIFtag->SetToolTip(_("(not implemented yet)"));
|
||||
|
||||
//s_head.Add( &s_misc, SizerFlags::SubGroup() );
|
||||
|
|
|
@ -152,14 +152,14 @@ Panels::UsermodeSelectionPanel::UsermodeSelectionPanel( wxWindow& parent, int id
|
|||
const RadioPanelItem UsermodeOptions[] =
|
||||
{
|
||||
RadioPanelItem(
|
||||
_("Current working folder (intended for developer use only)"),
|
||||
_("Location: ") + wxGetCwd(),
|
||||
_("This setting requires administration privileges from your operating system.")
|
||||
_("User Documents (recommended)"),
|
||||
_("Location: ") + wxStandardPaths::Get().GetDocumentsDir()
|
||||
),
|
||||
|
||||
RadioPanelItem(
|
||||
_("User Documents (recommended)"),
|
||||
_("Location: ") + wxStandardPaths::Get().GetDocumentsDir()
|
||||
_("Current working folder (intended for developer use only)"),
|
||||
_("Location: ") + wxGetCwd(),
|
||||
_("This setting requires administration privileges from your operating system.")
|
||||
),
|
||||
};
|
||||
|
||||
|
@ -176,7 +176,7 @@ Panels::UsermodeSelectionPanel::UsermodeSelectionPanel( wxWindow& parent, int id
|
|||
|
||||
void Panels::UsermodeSelectionPanel::Apply()
|
||||
{
|
||||
UseAdminMode = (m_radio_UserMode->GetSelection() == 0);
|
||||
UseAdminMode = (m_radio_UserMode->GetSelection() == 1);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
|
|
@ -349,11 +349,13 @@ void Panels::PluginSelectorPanel::Apply()
|
|||
wxString plugname( tbl_PluginInfo[ex.PluginId].GetShortname() );
|
||||
|
||||
throw Exception::CannotApplySettings( this,
|
||||
// English Log
|
||||
// Diagnostic
|
||||
ex.FormatDiagnosticMessage(),
|
||||
|
||||
// Translated
|
||||
wxsFormat( L"The selected %s plugin failed to load.", plugname.c_str() ) + L"\n\n" + GetApplyFailedMsg()
|
||||
wxsFormat( _("The selected %s plugin failed to load.\n\nReason: %s\n\n"),
|
||||
plugname.c_str(), ex.FormatDisplayMessage().c_str()
|
||||
) + GetApplyFailedMsg()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,22 +16,22 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
#include "MainFrame.h"
|
||||
|
||||
RecentIsoList::RecentIsoList( wxMenu* menu ) :
|
||||
RecentIsoManager::RecentIsoManager( wxMenu* menu ) :
|
||||
m_Menu( menu )
|
||||
, m_MaxLength( g_Conf->RecentFileCount )
|
||||
, m_cursel( 0 )
|
||||
, m_Separator( NULL )
|
||||
, m_Listener_SettingsLoadSave( wxGetApp().Source_SettingsLoadSave(), EventListener<IniInterface>( this, OnSettingsLoadSave ) )
|
||||
{
|
||||
Connect( wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(RecentIsoList::OnChangedSelection) );
|
||||
Connect( wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(RecentIsoManager::OnChangedSelection) );
|
||||
}
|
||||
|
||||
RecentIsoList::~RecentIsoList() throw()
|
||||
RecentIsoManager::~RecentIsoManager() throw()
|
||||
{
|
||||
Disconnect( wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(RecentIsoList::OnChangedSelection) );
|
||||
Disconnect( wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(RecentIsoManager::OnChangedSelection) );
|
||||
}
|
||||
|
||||
void RecentIsoList::OnChangedSelection( wxCommandEvent& evt )
|
||||
void RecentIsoManager::OnChangedSelection( wxCommandEvent& evt )
|
||||
{
|
||||
uint cnt = m_Items.size();
|
||||
uint i=0;
|
||||
|
@ -53,7 +53,7 @@ void RecentIsoList::OnChangedSelection( wxCommandEvent& evt )
|
|||
if( resume ) CoreThread.Resume();
|
||||
}
|
||||
|
||||
void RecentIsoList::RemoveAllFromMenu()
|
||||
void RecentIsoManager::RemoveAllFromMenu()
|
||||
{
|
||||
if( m_Menu == NULL ) return;
|
||||
|
||||
|
@ -73,7 +73,7 @@ void RecentIsoList::RemoveAllFromMenu()
|
|||
}
|
||||
}
|
||||
|
||||
void RecentIsoList::Repopulate()
|
||||
void RecentIsoManager::Repopulate()
|
||||
{
|
||||
int cnt = m_Items.size();
|
||||
if( cnt <= 0 ) return;
|
||||
|
@ -84,7 +84,7 @@ void RecentIsoList::Repopulate()
|
|||
InsertIntoMenu( i );
|
||||
}
|
||||
|
||||
void RecentIsoList::Add( const wxString& src )
|
||||
void RecentIsoManager::Add( const wxString& src )
|
||||
{
|
||||
if( src.IsEmpty() ) return;
|
||||
|
||||
|
@ -122,7 +122,7 @@ void RecentIsoList::Add( const wxString& src )
|
|||
}
|
||||
}
|
||||
|
||||
void RecentIsoList::InsertIntoMenu( int id )
|
||||
void RecentIsoManager::InsertIntoMenu( int id )
|
||||
{
|
||||
if( m_Menu == NULL ) return;
|
||||
RecentItem& curitem( m_Items[id] );
|
||||
|
@ -132,7 +132,7 @@ void RecentIsoList::InsertIntoMenu( int id )
|
|||
curitem.ItemPtr->Check();
|
||||
}
|
||||
|
||||
void RecentIsoList::DoSettingsLoadSave( IniInterface& ini )
|
||||
void RecentIsoManager::DoSettingsLoadSave( IniInterface& ini )
|
||||
{
|
||||
ini.GetConfig().SetRecordDefaults( false );
|
||||
|
||||
|
@ -168,8 +168,8 @@ void RecentIsoList::DoSettingsLoadSave( IniInterface& ini )
|
|||
ini.GetConfig().SetRecordDefaults( true );
|
||||
}
|
||||
|
||||
void __evt_fastcall RecentIsoList::OnSettingsLoadSave( void* obj, IniInterface& ini )
|
||||
void __evt_fastcall RecentIsoManager::OnSettingsLoadSave( void* obj, IniInterface& ini )
|
||||
{
|
||||
if( obj == NULL ) return;
|
||||
((RecentIsoList*)obj)->DoSettingsLoadSave( ini );
|
||||
((RecentIsoManager*)obj)->DoSettingsLoadSave( ini );
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
#pragma once
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// RecentIsoList
|
||||
// RecentIsoManager
|
||||
// --------------------------------------------------------------------------------------
|
||||
class RecentIsoList : public wxEvtHandler
|
||||
class RecentIsoManager : public wxEvtHandler
|
||||
{
|
||||
protected:
|
||||
struct RecentItem
|
||||
|
@ -28,10 +28,10 @@ protected:
|
|||
|
||||
RecentItem() { ItemPtr = NULL; }
|
||||
|
||||
RecentItem( const wxString& src ) :
|
||||
Filename( src )
|
||||
, ItemPtr( NULL )
|
||||
RecentItem( const wxString& src )
|
||||
: Filename( src )
|
||||
{
|
||||
ItemPtr = NULL;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -46,8 +46,8 @@ protected:
|
|||
EventListenerBinding<IniInterface> m_Listener_SettingsLoadSave;
|
||||
|
||||
public:
|
||||
RecentIsoList( wxMenu* menu );
|
||||
virtual ~RecentIsoList() throw();
|
||||
RecentIsoManager( wxMenu* menu );
|
||||
virtual ~RecentIsoManager() throw();
|
||||
|
||||
void RemoveAllFromMenu();
|
||||
void Repopulate();
|
||||
|
|
|
@ -378,6 +378,32 @@ EXPORT_C GSconfigure()
|
|||
|
||||
EXPORT_C_(INT32) GStest()
|
||||
{
|
||||
if(!GSUtil::CheckSSE())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
s_hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
if(!GSUtil::CheckDirectX())
|
||||
{
|
||||
if(SUCCEEDED(s_hr))
|
||||
::CoUninitialize();
|
||||
|
||||
s_hr = E_FAIL;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(SUCCEEDED(s_hr))
|
||||
::CoUninitialize();
|
||||
|
||||
s_hr = E_FAIL;
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue