mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: Remove wx2.8 code and uses of wxMAJOR_VERSION
Technically wxMAJOR_VERSION wasn't the right thing to use, but it was good enough.
This commit is contained in:
parent
5e5069423b
commit
d89043d8ac
|
@ -438,17 +438,10 @@ void cdvdReadKey(u8, u16, u32 arg2, u8* key)
|
|||
|
||||
// combine the lower 7 bits of each char
|
||||
// to make the 4 letters fit into a single u32
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
letters = (s32)((DiscSerial[3].GetValue()&0x7F)<< 0) |
|
||||
(s32)((DiscSerial[2].GetValue()&0x7F)<< 7) |
|
||||
(s32)((DiscSerial[1].GetValue()&0x7F)<<14) |
|
||||
(s32)((DiscSerial[0].GetValue()&0x7F)<<21);
|
||||
#else
|
||||
letters = (s32)((DiscSerial[3]&0x7F)<< 0) |
|
||||
(s32)((DiscSerial[2]&0x7F)<< 7) |
|
||||
(s32)((DiscSerial[1]&0x7F)<<14) |
|
||||
(s32)((DiscSerial[0]&0x7F)<<21);
|
||||
#endif
|
||||
}
|
||||
|
||||
// calculate magic numbers
|
||||
|
|
|
@ -237,12 +237,10 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
bool Write( const wxString msg ) const
|
||||
{
|
||||
return Write(msg.wc_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -437,12 +437,8 @@ int EnumeratePluginsInFolder(const wxDirName& searchpath, wxArrayString* dest)
|
|||
wxString pattern( L"*%s*" );
|
||||
#endif
|
||||
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
wxDir::GetAllFiles( searchpath.ToString(), realdest, pxsFmt( pattern, WX_STR(wxDynamicLibrary::GetDllExt())), wxDIR_FILES );
|
||||
#else
|
||||
wxDir::GetAllFiles( searchpath.ToString(), realdest, pxsFmt( pattern, wxDynamicLibrary::GetDllExt()), wxDIR_FILES );
|
||||
#endif
|
||||
|
||||
|
||||
// SECURITY ISSUE: (applies primarily to Windows, but is a good idea on any platform)
|
||||
// The search folder order for plugins can vary across operating systems, and in some poorly designed
|
||||
// cases (old versions of windows), the search order is a security hazard because it does not
|
||||
|
|
|
@ -41,11 +41,6 @@
|
|||
#endif
|
||||
|
||||
#ifdef __WXGTK__
|
||||
|
||||
#if wxMAJOR_VERSION < 3
|
||||
#include <wx/gtk/win_gtk.h> // GTK_PIZZA interface (internal include removed in 3.0)
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
@ -463,11 +458,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
#if wxMAJOR_VERSION < 3
|
||||
wxStandardPathsBase& Pcsx2AppTraits::GetStandardPaths()
|
||||
#else
|
||||
wxStandardPaths& Pcsx2AppTraits::GetStandardPaths()
|
||||
#endif
|
||||
{
|
||||
static Pcsx2StandardPaths stdPaths;
|
||||
return stdPaths;
|
||||
|
@ -648,10 +639,10 @@ void Pcsx2App::HandleEvent(wxEvtHandler* handler, wxEventFunction func, wxEvent&
|
|||
// PCSX2. This probably happened in the BIOS error case above as well.
|
||||
// So the idea is to explicitly close the gsFrame before the modal MessageBox appears and
|
||||
// intercepts the close message. Only for wx3.0 though - it sometimes breaks linux wx2.8.
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
|
||||
if (GSFrame* gsframe = wxGetApp().GetGsFramePtr())
|
||||
gsframe->Close();
|
||||
#endif
|
||||
|
||||
Console.Error(ex.FormatDiagnosticMessage());
|
||||
|
||||
// Make sure it terminates properly for nogui users.
|
||||
|
@ -969,20 +960,12 @@ void Pcsx2App::OpenGsPanel()
|
|||
// unfortunately it creates a gray box in the middle of the window on some
|
||||
// users.
|
||||
|
||||
#if wxMAJOR_VERSION < 3
|
||||
GtkWidget *child_window = gtk_bin_get_child(GTK_BIN(gsFrame->GetViewport()->GetHandle()));
|
||||
#else
|
||||
GtkWidget *child_window = GTK_WIDGET(gsFrame->GetViewport()->GetHandle());
|
||||
#endif
|
||||
|
||||
gtk_widget_realize(child_window); // create the widget to allow to use GDK_WINDOW_* macro
|
||||
gtk_widget_set_double_buffered(child_window, false); // Disable the widget double buffer, you will use the opengl one
|
||||
|
||||
#if wxMAJOR_VERSION < 3
|
||||
GdkWindow* draw_window = GTK_PIZZA(child_window)->bin_window;
|
||||
#else
|
||||
GdkWindow* draw_window = gtk_widget_get_window(child_window);
|
||||
#endif
|
||||
|
||||
#if GTK_MAJOR_VERSION < 3
|
||||
Window Xwindow = GDK_WINDOW_XWINDOW(draw_window);
|
||||
|
|
|
@ -37,14 +37,8 @@ PipeRedirectionBase::~PipeRedirectionBase() throw() {}
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
#if wxMAJOR_VERSION < 3
|
||||
void pxLogConsole::DoLog( wxLogLevel level, const wxChar *szString, time_t t )
|
||||
{
|
||||
wxString message(szString);
|
||||
#else
|
||||
void pxLogConsole::DoLogRecord(wxLogLevel level, const wxString &message, const wxLogRecordInfo &info)
|
||||
{
|
||||
#endif
|
||||
switch ( level )
|
||||
{
|
||||
case wxLOG_Trace:
|
||||
|
|
|
@ -55,11 +55,7 @@ public:
|
|||
pxLogConsole() {}
|
||||
|
||||
protected:
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
virtual void DoLogRecord(wxLogLevel level, const wxString &message, const wxLogRecordInfo &info);
|
||||
#else
|
||||
virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -128,11 +128,7 @@ void RecentIsoManager::Repopulate()
|
|||
// it starts a new group, but it also spews a couple warnings about it in Linux.
|
||||
#ifdef __linux__
|
||||
// FIXME is it still useful on v3
|
||||
#if wxMAJOR_VERSION >= 3
|
||||
m_Menu->Remove( m_Menu->Append( -1, "dummy" ) );
|
||||
#else
|
||||
m_Menu->Remove( m_Menu->Append( -1 ) );
|
||||
#endif
|
||||
#endif
|
||||
//Note: the internal recent iso list (m_Items) has the most recent item last (also at the INI file)
|
||||
// but the menu is composed in reverse order such that the most recent item appears at the top.
|
||||
|
|
|
@ -79,11 +79,7 @@ static void i18n_DoPackageCheck( wxLanguage wxLangId, LangPackList& langs, bool&
|
|||
|
||||
// note: wx preserves the current locale for us, so creating a new locale and deleting
|
||||
// will not affect program status.
|
||||
#if wxMAJOR_VERSION < 3
|
||||
std::unique_ptr<wxLocale> locale(new wxLocale(wxLangId, wxLOCALE_CONV_ENCODING));
|
||||
#else
|
||||
std::unique_ptr<wxLocale> locale(new wxLocale(wxLangId, 0));
|
||||
#endif
|
||||
|
||||
// Force the msgIdLanguage param to wxLANGUAGE_UNKNOWN to disable wx's automatic english
|
||||
// matching logic, which will bypass the catalog loader for all english-based dialects, and
|
||||
|
|
Loading…
Reference in New Issue