X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b46b1d59d6f69ad80dcf5955375578a6504d100a..9cb0c458c4601f444437f7e816efe654158eaf90:/src/palmos/app.cpp diff --git a/src/palmos/app.cpp b/src/palmos/app.cpp index 1344607c9f..6accd4a64f 100644 --- a/src/palmos/app.cpp +++ b/src/palmos/app.cpp @@ -39,7 +39,7 @@ #include "wx/dialog.h" #include "wx/msgdlg.h" #include "wx/intl.h" - #include "wx/wxchar.h" + #include "wx/crt.h" #include "wx/log.h" #include "wx/module.h" #endif @@ -120,12 +120,14 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const return wxPORT_PALMOS; } +#if wxUSE_TIMER wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) { return new wxPalmOSTimerImpl(timer); }; +#endif // wxUSE_TIMER -wxEventLoop* wxGUIAppTraits::CreateEventLoop() +wxEventLoopBase* wxGUIAppTraits::CreateEventLoop() { return new wxEventLoop; } @@ -142,7 +144,6 @@ int wxApp::m_nCmdShow = 0; IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) EVT_END_SESSION(wxApp::OnEndSession) EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession) END_EVENT_TABLE() @@ -228,28 +229,27 @@ wxApp::wxApp() wxApp::~wxApp() { + wxChar **argv_tmp; + argv_tmp = argv; + // src/palmos/main.cpp // our cmd line arguments are allocated inside wxEntry(HINSTANCE), they // don't come from main(), so we have to free them - while ( argc ) { // m_argv elements were allocated by wxStrdup() - free(argv[--argc]); + if (argv_tmp[--argc]) { + free((void *)(argv_tmp[--argc])); + } } - // but m_argv itself -- using new[] - delete [] argv; + delete [] argv_tmp; + //argv = NULL; } // ---------------------------------------------------------------------------- // wxApp idle handling // ---------------------------------------------------------------------------- -void wxApp::OnIdle(wxIdleEvent& event) -{ - wxAppBase::OnIdle(event); -} - void wxApp::WakeUpIdle() { }