Starting to remove windows.h includes from things.
This commit is contained in:
@@ -10,9 +10,15 @@
|
||||
#ifndef XENIA_BASE_PLATFORM_H_
|
||||
#define XENIA_BASE_PLATFORM_H_
|
||||
|
||||
// This file contains the main platform switches used by xenia as well as any
|
||||
// fixups required to normalize the environment. Everything in here should be
|
||||
// largely portable.
|
||||
// Platform-specific headers, like platform_win.h, are used to house any
|
||||
// super platform-specific stuff that implies code is not platform-agnostic.
|
||||
//
|
||||
// NOTE: ordering matters here as sometimes multiple flags are defined on
|
||||
// certain platforms.
|
||||
|
||||
//
|
||||
// Great resource on predefined macros: http://predef.sourceforge.net/preos.html
|
||||
|
||||
#if defined(__APPLE__)
|
||||
@@ -42,25 +48,12 @@
|
||||
#endif
|
||||
|
||||
#if XE_PLATFORM_WIN32
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#define NOMINMAX
|
||||
#include <SDKDDKVer.h>
|
||||
#include <windows.h>
|
||||
#include <ObjBase.h>
|
||||
#include <shellapi.h>
|
||||
#include <shlwapi.h>
|
||||
#include <shobjidl.h>
|
||||
#include <dwmapi.h>
|
||||
#include <tpcshrd.h>
|
||||
#include <windowsx.h>
|
||||
#define strdup _strdup
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#undef DeleteBitmap
|
||||
#undef GetFirstChild
|
||||
#endif // XE_PLATFORM_WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX // Don't want windows.h including min/max macros.
|
||||
#endif // XE_PLATFORM_WIN32
|
||||
|
||||
#if XE_COMPILER_MSVC
|
||||
#include <intrin.h>
|
||||
@@ -73,15 +66,19 @@ namespace xe {
|
||||
#if XE_PLATFORM_WIN32
|
||||
const char path_separator = '\\';
|
||||
const wchar_t wpath_separator = L'\\';
|
||||
const size_t max_path = _MAX_PATH;
|
||||
const size_t max_path = 260; // _MAX_PATH
|
||||
#else
|
||||
const char path_separator = '/';
|
||||
const wchar_t wpath_separator = L'/';
|
||||
const size_t max_path = 1024; // PATH_MAX
|
||||
#endif // XE_PLATFORM_WIN32
|
||||
|
||||
// Launches a web browser to the given URL.
|
||||
void LaunchBrowser(const char* url);
|
||||
|
||||
// Returns the native page size of the system, in bytes.
|
||||
size_t page_size();
|
||||
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_BASE_PLATFORM_H_
|
||||
|
||||
Reference in New Issue
Block a user