Linux: Minor fixups!

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1952 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-10-04 09:00:07 +00:00
parent 8ba39b71de
commit db01c15977
7 changed files with 34 additions and 33 deletions

View File

@ -229,7 +229,7 @@ This theoretically unoptimizes. Not having much luck so far.
# define __naked // GCC lacks the naked specifier # define __naked // GCC lacks the naked specifier
# define __assume(cond) // GCC has no equivalent for __assume # define __assume(cond) // GCC has no equivalent for __assume
# define CALLBACK __stdcall # define CALLBACK __attribute__((stdcall))
// Inlining note: GCC needs ((unused)) attributes defined on inlined functions to suppress // Inlining note: GCC needs ((unused)) attributes defined on inlined functions to suppress
// warnings when a static inlined function isn't used in the scope of a single file (which // warnings when a static inlined function isn't used in the scope of a single file (which

View File

@ -52,7 +52,7 @@ DEVASSERT_INLINE void pxOnAssert( const wxChar* file, int line, const char* func
{ {
// Note: Format uses MSVC's syntax for output window hotlinking. // Note: Format uses MSVC's syntax for output window hotlinking.
wxsFormat( L"%s(%d): Assertion failed in %s: %s\n", wxsFormat( L"%s(%d): Assertion failed in %s: %s\n",
file, line, fromUTF8(func), msg ); file, line, fromUTF8(func).c_str(), msg );
wxLogError( msg ); wxLogError( msg );
} }

View File

@ -173,7 +173,7 @@ wxString Path::GetDirectory( const wxString& src )
// Example /this/that/something.txt -> dest == "/" // Example /this/that/something.txt -> dest == "/"
wxString Path::GetRootDirectory( const wxString& src ) wxString Path::GetRootDirectory( const wxString& src )
{ {
int pos = src.find_first_of( wxFileName::GetPathSeparators() ); size_t pos = src.find_first_of( wxFileName::GetPathSeparators() );
if( pos == wxString::npos ) if( pos == wxString::npos )
return wxString(); return wxString();
else else

View File

@ -214,6 +214,6 @@ void px_fputs( FILE* fp, const char* src )
// Linux is happy with plain old LFs. Not sure about Macs... does OSX still // Linux is happy with plain old LFs. Not sure about Macs... does OSX still
// go by the old school Mac style of using Crs only? // go by the old school Mac style of using Crs only?
fputs( src, emuLog ); // fputs does not do automatic newlines, so it's ok! fputs( src, fp ); // fputs does not do automatic newlines, so it's ok!
#endif #endif
} }

View File

@ -222,12 +222,12 @@ namespace Threading
catch( std::logic_error& ex ) catch( std::logic_error& ex )
{ {
throw Exception::LogicError( wxsFormat( L"(thread: %s) STL Logic Error: %s\n\t%s", throw Exception::LogicError( wxsFormat( L"(thread: %s) STL Logic Error: %s\n\t%s",
GetName().c_str(), wxString::FromUTF8( ex.what() ) ) GetName().c_str(), fromUTF8( ex.what() ).c_str() )
); );
} }
catch( Exception::LogicError& ex ) catch( Exception::LogicError& ex )
{ {
m_except->DiagMsg() = wxsFormat( L"(thread:%s) ", GetName() ) + m_except->DiagMsg(); m_except->DiagMsg() = wxsFormat( L"(thread:%s) ", GetName().c_str() ) + m_except->DiagMsg();
ex.Rethrow(); ex.Rethrow();
} }
catch( std::runtime_error& ex ) catch( std::runtime_error& ex )
@ -235,19 +235,19 @@ namespace Threading
m_except = new Exception::RuntimeError( m_except = new Exception::RuntimeError(
// Diagnostic message: // Diagnostic message:
wxsFormat( L"(thread: %s) STL Runtime Error: %s\n\t%s", wxsFormat( L"(thread: %s) STL Runtime Error: %s\n\t%s",
GetName().c_str(), wxString::FromUTF8( ex.what() ) GetName().c_str(), fromUTF8( ex.what() ).c_str()
), ),
// User Message (not translated, std::exception doesn't have that kind of fancy! // User Message (not translated, std::exception doesn't have that kind of fancy!
wxsFormat( L"A runtime error occurred in %s:\n\n%s (STL)", wxsFormat( L"A runtime error occurred in %s:\n\n%s (STL)",
GetName().c_str(), wxString::FromUTF8( ex.what() ) GetName().c_str(), fromUTF8( ex.what() ).c_str()
) )
); );
} }
catch( Exception::RuntimeError& ex ) catch( Exception::RuntimeError& ex )
{ {
m_except = ex.Clone(); m_except = ex.Clone();
m_except->DiagMsg() = wxsFormat( L"(thread:%s) ", GetName() ) + m_except->DiagMsg(); m_except->DiagMsg() = wxsFormat( L"(thread:%s) ", GetName().c_str() ) + m_except->DiagMsg();
} }
} }

View File

@ -269,6 +269,7 @@
<Unit filename="../gui/AppAssert.cpp" /> <Unit filename="../gui/AppAssert.cpp" />
<Unit filename="../gui/AppConfig.cpp" /> <Unit filename="../gui/AppConfig.cpp" />
<Unit filename="../gui/AppConfig.h" /> <Unit filename="../gui/AppConfig.h" />
<Unit filename="../gui/AppInit.cpp" />
<Unit filename="../gui/AppMain.cpp" /> <Unit filename="../gui/AppMain.cpp" />
<Unit filename="../gui/AppRes.cpp" /> <Unit filename="../gui/AppRes.cpp" />
<Unit filename="../gui/CheckedStaticBox.cpp" /> <Unit filename="../gui/CheckedStaticBox.cpp" />

View File

@ -566,7 +566,7 @@ void Panels::PluginSelectorPanel::EnumThread::ExecuteTask()
DoNextPlugin( curidx ); DoNextPlugin( curidx );
if( (curidx & 3) == 3 ) wxGetApp().Ping(); // gives the gui thread some time to refresh if( (curidx & 3) == 3 ) wxGetApp().Ping(); // gives the gui thread some time to refresh
pthread_testcancel(); pthread_testcancel();
Sleep(150); //Sleep(150); // uncomment this to slow down the selector, for debugging threading.
} }
wxCommandEvent done( pxEVT_EnumerationFinished ); wxCommandEvent done( pxEVT_EnumerationFinished );