mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-23 11:15:34 +08:00
separate header file for OS detection
This commit is contained in:
parent
15bc66a1da
commit
e03ed9e1cd
@ -19,27 +19,7 @@
|
||||
#define __INCLUDED_COMMON_INCLUDES__
|
||||
|
||||
// OS detection
|
||||
#if defined(WIN64) || defined(_WIN64) || defined(__MINGW64__)
|
||||
#define __WINDOWS_64__
|
||||
#elif defined(WIN32) || defined(_WIN32) || defined(__MINGW32__)
|
||||
#define __WINDOWS_32__
|
||||
#endif
|
||||
|
||||
#if defined(__WINDOWS_32__) || defined(__WINDOWS_64__)
|
||||
#define __WINDOWS__
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(linux)
|
||||
#if defined(__x86_64__)
|
||||
#define __LINUX_64__
|
||||
#else
|
||||
#define __LINUX_32__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__LINUX_32__) || defined(__LINUX_64__)
|
||||
#define __LINUX__
|
||||
#endif
|
||||
#include "common_helpers/os_detector.h"
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
#define STEAM_WIN32
|
||||
|
33
helpers/common_helpers/os_detector.h
Normal file
33
helpers/common_helpers/os_detector.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef __INCLUDED_OS_DETECTOR__
|
||||
#define __INCLUDED_OS_DETECTOR__
|
||||
|
||||
|
||||
#if defined(WIN64) || defined(_WIN64) || defined(__MINGW64__)
|
||||
#define __WINDOWS_64__
|
||||
#elif defined(WIN32) || defined(_WIN32) || defined(__MINGW32__)
|
||||
#define __WINDOWS_32__
|
||||
#endif
|
||||
|
||||
#if defined(__WINDOWS_32__) || defined(__WINDOWS_64__)
|
||||
#define __WINDOWS__
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(linux)
|
||||
#if defined(__x86_64__)
|
||||
#define __LINUX_64__
|
||||
#else
|
||||
#define __LINUX_32__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__LINUX_32__) || defined(__LINUX_64__)
|
||||
#define __LINUX__
|
||||
#endif
|
||||
|
||||
// https://sourceforge.net/p/predef/wiki/OperatingSystems/
|
||||
#if defined(__APPLE__) || defined(macintosh) || defined(Macintosh) || defined(__MACH__)
|
||||
#define __MACOS__
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user