Skip to content

Commit

Permalink
Merge pull request #46 from Jarod42/DELETE_MACRO
Browse files Browse the repository at this point in the history
Delete macro
  • Loading branch information
Jarod42 authored Aug 22, 2024
2 parents f0b56af + 45cafb3 commit 0bb8561
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Version 1.1.0
* Widget::hasModalFocus has been renamed to Widget::isModalFocused.
* Widget::hasModalMouseInputFocus has been renamed to Widget::isModalMouseInputFocused.
* Widget::generateAction has been renamed to Widget::distributeActionEvent.
* DELETE is now undefined in Key.hpp if present. It should hopefully
take care of some problems with windows.h defining delete which
sometimes breaks Key.hpp.

Version 1.0.0
=============
Expand Down
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Continue rebasing from d0400d4714bcdad2d1f00283c80e77317147ea5c
* Continue rebasing from 063dc975e98dfc74c2565229ce175cccc70fa4dd
* Add a focus listener interface.
* Make focus apply synchronously.
* Graphics and input objects for DirectX.
Expand Down
7 changes: 7 additions & 0 deletions include/guisan/key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@

#include "guisan/platform.hpp"

// <windows.h> defines DELETE which breaks this file as we have a constant named
// DELETE, hence we undefine DELETE if it is defined and hope people don't use
// that windows define with Guisan.
#if defined(_WIN32) && defined(DELETE)
# undef DELETE
#endif

namespace gcn
{
/**
Expand Down
9 changes: 3 additions & 6 deletions include/guisan/opengl/openglimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,9 @@
#ifndef GCN_OPENGLIMAGE_HPP
#define GCN_OPENGLIMAGE_HPP

#if defined (_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined (DELETE)
#undef DELETE
#endif
#if defined(_WIN32)
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif

#if defined (__APPLE__)
Expand Down

0 comments on commit 0bb8561

Please sign in to comment.