Use #ifdef/#ifndef instead of #if defined/#if \!defined

This commit is contained in:
Anonymous Maarten
2023-03-30 20:26:31 +02:00
committed by Anonymous Maarten
parent 308bcbbe76
commit b6ae281e97
129 changed files with 450 additions and 450 deletions

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if defined(__HAIKU__)
#ifdef __HAIKU__
/* Handle the BeApp specific portions of the application */

View File

@@ -61,7 +61,7 @@ static char *GetAppName(void)
char linkfile[1024];
int linksize;
#if defined(__LINUX__)
#ifdef __LINUX__
(void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/exe", getpid());
#elif defined(__FREEBSD__)
(void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/file", getpid());

View File

@@ -319,7 +319,7 @@ static struct wscons_keycode_to_SDL
{ KS_f18, SDL_SCANCODE_F18 },
{ KS_f19, SDL_SCANCODE_F19 },
{ KS_f20, SDL_SCANCODE_F20 },
#if !defined(__NetBSD__)
#ifndef __NetBSD__
{ KS_f21, SDL_SCANCODE_F21 },
{ KS_f22, SDL_SCANCODE_F22 },
{ KS_f23, SDL_SCANCODE_F23 },

View File

@@ -25,7 +25,7 @@
#include "SDL_windows.h"
#include <objbase.h> /* for CoInitialize/CoUninitialize (Win32 only) */
#if defined(HAVE_ROAPI_H)
#ifdef HAVE_ROAPI_H
#include <roapi.h> /* For RoInitialize/RoUninitialize (Win32 only) */
#else
typedef enum RO_INIT_TYPE
@@ -411,7 +411,7 @@ SDL_RunApp(int _argc, char* _argv[], SDL_main_func mainFunction, void * reserved
/*
* Public APIs
*/
#if !defined(SDL_VIDEO_DRIVER_WINDOWS)
#ifndef SDL_VIDEO_DRIVER_WINDOWS
#if defined(__WIN32__) || defined(__GDK__)
int SDL_RegisterApp(const char *name, Uint32 style, void *hInst)

View File

@@ -24,7 +24,7 @@
#ifndef _INCLUDED_WINDOWS_H
#define _INCLUDED_WINDOWS_H
#if defined(__WIN32__)
#ifdef __WIN32__
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
@@ -36,7 +36,7 @@
#endif
#undef WINVER
#undef _WIN32_WINNT
#if defined(SDL_VIDEO_RENDER_D3D12)
#ifdef SDL_VIDEO_RENDER_D3D12
#define _WIN32_WINNT 0xA00 /* For D3D12, 0xA00 is required */
#elif defined(HAVE_SHELLSCALINGAPI_H)
#define _WIN32_WINNT 0x603 /* For DPI support */
@@ -118,7 +118,7 @@ extern int WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr);
/* Sets an error message based on GetLastError(). Always return -1. */
extern int WIN_SetError(const char *prefix);
#if !defined(__WINRT__)
#ifndef __WINRT__
/* Load a function from combase.dll */
void *WIN_LoadComBaseFunction(const char *name);
#endif