Remove adherence from libopenui_file to libopenui_defines

This commit is contained in:
Bertrand Songis
2020-11-05 15:36:00 +01:00
parent 25a3a20642
commit 8ff85a33b6
3 changed files with 36 additions and 15 deletions
+34
View File
@@ -0,0 +1,34 @@
/*
* Copyright (C) OpenTX
*
* Source:
* https://github.com/opentx/libopenui
*
* This file is a part of libopenui library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
#pragma once
#if defined(__MINGW32__) || !defined(__GNUC__)
#include <windows.h>
#include <tchar.h>
#define sleep(x) Sleep(x)
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define chdir _chdir
#define getcwd _getcwd
// remove windows default definitions
#undef OPAQUE
#undef RGB
#undef EXTERN_C
#endif
+1 -14
View File
@@ -20,6 +20,7 @@
#pragma once
#include "libopenui_types.h"
#include "libopenui_compat.h"
/* obsolete flags */
#define BLINK 0
@@ -73,20 +74,6 @@
#define GET_BLUE(color) \
(((color) & 0x001F) << 3)
#if defined(__MINGW32__) || !defined(__GNUC__)
#include <windows.h>
#include <tchar.h>
#define sleep(x) Sleep(x)
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define chdir _chdir
#define getcwd _getcwd
// remove windows default definitions
#undef OPAQUE
#undef RGB
#undef EXTERN_C
#endif
#define OPACITY_MAX 0x0Fu
#define OPACITY(value) ((value) << 24u)
+1 -1
View File
@@ -19,7 +19,7 @@
#pragma once
#include "libopenui_defines.h" // for strcasecmp / VC++
#include "libopenui_compat.h" // for strcasecmp / VC++
#include <string>
#include <cstring>
#include <cinttypes>