Build fix for wx2.x

This commit is contained in:
skidau 2015-04-23 10:00:14 +00:00
parent 69c7f79e92
commit c30ce554ef
2 changed files with 12 additions and 2 deletions

View File

@ -20,8 +20,13 @@ extern "C" {
#include "../gb/gbPrinter.h"
#include "../gba/agbprint.h"
#if (wxMAJOR_VERSION < 3)
#define GetXRCDialog(n) \
dynamic_cast<wxDialog*>(FindWindowByName(n))
wxStaticCast(wxGetApp().frame->FindWindow(XRCID(n)), wxDialog)
#else
#define GetXRCDialog(n) \
wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog)
#endif
bool cmditem_lt(const struct cmditem &cmd1, const struct cmditem &cmd2)
{

View File

@ -43,8 +43,13 @@ static void mark_recursive(wxWindowBase *w)
mark_recursive(*ch);
}
#if (wxMAJOR_VERSION < 3)
#define GetXRCDialog(n) \
wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog)
wxStaticCast(wxGetApp().frame->FindWindow(XRCID(n)), wxDialog)
#else
#define GetXRCDialog(n) \
wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog)
#endif
// Event handlers must be methods of wxEvtHandler-derived objects