diff --git a/panda/src/display/customGraphicsWindowProc.cxx b/panda/src/display/customGraphicsWindowProc.cxx index cab48df3d1..6450d27fff 100644 --- a/panda/src/display/customGraphicsWindowProc.cxx +++ b/panda/src/display/customGraphicsWindowProc.cxx @@ -26,7 +26,7 @@ CustomGraphicsWindowProc::~CustomGraphicsWindowProc(){ Py_DECREF(_handler); } -#if defined(__WIN32__) || defined(_WIN32) +#ifdef WIN32 LONG CustomGraphicsWindowProc::wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam){ PyObject* ret = PyObject_CallFunction(_handler, "IIII", hwnd, msg, wparam, lparam); Py_XDECREF(ret); diff --git a/panda/src/display/customGraphicsWindowProc.h b/panda/src/display/customGraphicsWindowProc.h index bc64221fb2..28bcdad9d4 100644 --- a/panda/src/display/customGraphicsWindowProc.h +++ b/panda/src/display/customGraphicsWindowProc.h @@ -23,7 +23,7 @@ public: CustomGraphicsWindowProc(PyObject* handler, PyObject* name); virtual ~CustomGraphicsWindowProc(); -#if defined(__WIN32__) || defined(_WIN32) +#ifdef WIN32 virtual LONG wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); #endif diff --git a/panda/src/display/graphicsWindowProc.h b/panda/src/display/graphicsWindowProc.h index 6093526b71..8034131544 100644 --- a/panda/src/display/graphicsWindowProc.h +++ b/panda/src/display/graphicsWindowProc.h @@ -19,11 +19,11 @@ #include "pandabase.h" #include "typedReferenceCount.h" -#if defined(__WIN32__) || defined(_WIN32) - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN 1 - #endif - #include +#ifdef WIN32 +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include #endif /* @@ -60,4 +60,4 @@ private: static TypeHandle _type_handle; }; -#endif //GRAPHICSWINDOWPROC_H \ No newline at end of file +#endif //GRAPHICSWINDOWPROC_H