Use _WIN32 macro to detect Windows (instead of other macro variants)
This commit is contained in:
parent
2e28b3ffc6
commit
4dc8b6a183
4 changed files with 5 additions and 6 deletions
|
|
@ -15,7 +15,7 @@ namespace psemek::io
|
|||
throw util::system_error(std::error_code{errno, std::system_category()}, "Failed to open " + path.string());
|
||||
}
|
||||
|
||||
#ifdef __WIN32__
|
||||
#ifdef _WIN32
|
||||
wchar_t const * fopen_read_mode()
|
||||
{
|
||||
return L"rb";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
|
||||
#define PSEMEK_SDL2_DISCRETE_GPU \
|
||||
extern "C" { __declspec(dllexport) unsigned long NvOptimusEnablement = 1; } \
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <psemek/util/to_string.hpp>
|
||||
#include <psemek/util/exception.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <libloaderapi.h>
|
||||
#include <errhandlingapi.h>
|
||||
#include <winerror.h>
|
||||
|
|
@ -13,7 +13,7 @@ namespace psemek::util
|
|||
|
||||
std::filesystem::path executable_path()
|
||||
{
|
||||
#if defined WIN32
|
||||
#if defined _WIN32
|
||||
std::wstring result(256, '\0');
|
||||
while (true)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include <psemek/util/open_url.hpp>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <thread>
|
||||
|
||||
namespace psemek::util
|
||||
{
|
||||
|
|
@ -13,7 +12,7 @@ namespace psemek::util
|
|||
if (!url.starts_with("http"))
|
||||
url = "https://" + url;
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
url = "start " + url;
|
||||
ignore(std::system(url.data()));
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue