X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ceb8f94a9603ac6fc1778799587af3b0ac215aa9..5c526007a8909e8856a6d1fb656c5150738d2e4a:/src/os2/utils.cpp diff --git a/src/os2/utils.cpp b/src/os2/utils.cpp index 1d01ee094f..df321ea4e3 100644 --- a/src/os2/utils.cpp +++ b/src/os2/utils.cpp @@ -342,6 +342,15 @@ void wxBell() DosBeep(1000,1000); // 1kHz during 1 sec. } + +void wxAppTraits::InitializeGui(unsigned long &ulHab) +{ +} + +void wxAppTraits::TerminateGui(unsigned long ulHab) +{ +} + wxToolkitInfo & wxConsoleAppTraits::GetToolkitInfo() { static wxToolkitInfo vInfo; @@ -371,18 +380,24 @@ const wxChar* wxGetHomeDir( wxString& rStrDir = *pStr; // OS/2 has no idea about home, - // so use the working directory instead? + // so use the working directory instead. + // However, we might have a valid HOME directory, + // as is used on many machines that have unix utilities + // on them, so we should use that, if available. // 256 was taken from os2def.h #ifndef MAX_PATH # define MAX_PATH 256 #endif - char zDirName[256]; - ULONG ulDirLen; + const wxChar *szHome = wxGetenv("HOME"); + if ( szHome == NULL ) { + // we're homeless, use current directory. + rStrDir = wxT("."); + } + else + rStrDir = szHome; - ::DosQueryCurrentDir(0, zDirName, &ulDirLen); - rStrDir = zDirName; return rStrDir.c_str(); }