X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99ee04b97b773ddbd7dbb8f2be3638c946eda208..431a3edc641e379b8f5d6010220250017e99a3ff:/src/mgl/cursor.cpp diff --git a/src/mgl/cursor.cpp b/src/mgl/cursor.cpp index 94df70a5c2..3ec1a27da2 100644 --- a/src/mgl/cursor.cpp +++ b/src/mgl/cursor.cpp @@ -8,7 +8,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "cursor.h" #endif @@ -57,7 +57,7 @@ wxCursorRefData::~wxCursorRefData() //----------------------------------------------------------------------------- -WX_DECLARE_HASH_MAP(int, wxCursor, wxIntegerHash, wxIntegerEqual, wxCursorsHash) +WX_DECLARE_HASH_MAP(int, wxCursor, wxIntegerHash, wxIntegerEqual, wxCursorsHash); static wxCursorsHash *gs_cursorsHash = NULL; @@ -69,6 +69,9 @@ wxCursor::wxCursor() wxCursor::wxCursor(int cursorId) { + if ( !gs_cursorsHash ) + gs_cursorsHash = new wxCursorsHash; + if ( gs_cursorsHash->find(cursorId) != gs_cursorsHash->end() ) { wxLogTrace(_T("mglcursor"), _T("cursor id %i fetched from cache"), cursorId); @@ -82,6 +85,7 @@ wxCursor::wxCursor(int cursorId) switch (cursorId) { case wxCURSOR_ARROW: cursorname = "arrow.cur"; break; + case wxCURSOR_RIGHT_ARROW: cursorname = "rightarr.cur"; break; case wxCURSOR_BULLSEYE: cursorname = "bullseye.cur"; break; case wxCURSOR_CHAR: cursorname = "char.cur"; break; case wxCURSOR_CROSS: cursorname = "cross.cur"; break; @@ -286,11 +290,7 @@ bool wxIsBusy() class wxCursorModule : public wxModule { public: - virtual bool OnInit() - { - gs_cursorsHash = new wxCursorsHash; - return TRUE; - } + virtual bool OnInit() { return TRUE; } virtual void OnExit() {