Browse Source

gl_utils.h: fix compil issue on Windows

__WINDOWS__ is defined in wxWidgets.
the right preprocessor symbol is _WIN32 for Windows 32/64 bits
pull/16/head
jean-pierre charras 5 years ago
parent
commit
286c36b7da
  1. 4
      include/gl_utils.h
  2. 6
      pcbnew/class_pad.cpp

4
include/gl_utils.h

@ -24,7 +24,7 @@
#ifndef GL_UTILS_H
#define GL_UTILS_H
#ifndef __WINDOWS__
#ifndef _WIN32
#include <GL/glxew.h>
#endif
@ -42,7 +42,7 @@ public:
{
/// This routine is written for Linux only. The equivalent functions under Windows would
/// include <wglext.h> and call wglSwapIntervalEXT
#ifndef __WINDOWS__
#ifndef _WIN32
Display *dpy = glXGetCurrentDisplay();
GLXDrawable drawable = glXGetCurrentDrawable();

6
pcbnew/class_pad.cpp

@ -342,15 +342,15 @@ void D_PAD::BuildEffectiveShapes() const
//
m_effectiveBoundingRadius = calcBoundingRadius();
m_effectiveBoundingBox = EDA_RECT(); // reset to prepare for merging
// reset the bbox to uninitialized state to prepare for merging
m_effectiveBoundingBox = EDA_RECT();
for( const std::shared_ptr<SHAPE>& shape : m_effectiveShapes )
{
BOX2I r = shape->BBox();
m_effectiveBoundingBox.Merge( EDA_RECT( (wxPoint) r.GetOrigin(),
wxSize( r.GetWidth(), r.GetHeight() ) ) );
wxSize( r.GetWidth(), r.GetHeight() ) ) );
}
// Hole shape
//
wxSize half_size = m_Drill / 2;

Loading…
Cancel
Save