mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-25 23:59:04 +00:00
Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_HAIKU
This commit is contained in:
@@ -82,7 +82,7 @@ static VideoBootStrap *bootstrap[] = {
|
||||
#ifdef SDL_VIDEO_DRIVER_WINRT
|
||||
&WINRT_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
&HAIKU_bootstrap,
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
@@ -4671,7 +4671,7 @@ int SDL_GetMessageBoxCount(void)
|
||||
#if SDL_VIDEO_DRIVER_X11
|
||||
#include "x11/SDL_x11messagebox.h"
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
#include "haiku/SDL_bmessagebox.h"
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_RISCOS
|
||||
@@ -4681,7 +4681,7 @@ int SDL_GetMessageBoxCount(void)
|
||||
#include "vita/SDL_vitamessagebox.h"
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_WINRT) || defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT) || SDL_VIDEO_DRIVER_X11 || SDL_VIDEO_DRIVER_WAYLAND || SDL_VIDEO_DRIVER_HAIKU || SDL_VIDEO_DRIVER_RISCOS
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_WINRT) || defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT) || SDL_VIDEO_DRIVER_X11 || SDL_VIDEO_DRIVER_WAYLAND || defined(SDL_VIDEO_DRIVER_HAIKU) || SDL_VIDEO_DRIVER_RISCOS
|
||||
static SDL_bool SDL_IsMessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
|
||||
{
|
||||
SDL_SysWMinfo info;
|
||||
@@ -4788,7 +4788,7 @@ int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
if (retval == -1 &&
|
||||
SDL_IsMessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
|
||||
HAIKU_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
/* BWindow based clipboard implementation */
|
||||
|
||||
@@ -52,7 +52,7 @@ int HAIKU_SetClipboardText(_THIS, const char *text) {
|
||||
|
||||
char *HAIKU_GetClipboardText(_THIS) {
|
||||
BMessage *clip = NULL;
|
||||
const char *text = NULL;
|
||||
const char *text = NULL;
|
||||
ssize_t length;
|
||||
char *result;
|
||||
if (be_clipboard->Lock()) {
|
||||
@@ -62,8 +62,8 @@ char *HAIKU_GetClipboardText(_THIS) {
|
||||
&length);
|
||||
}
|
||||
be_clipboard->Unlock();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (text == NULL) {
|
||||
result = SDL_strdup("");
|
||||
} else {
|
||||
@@ -71,7 +71,7 @@ char *HAIKU_GetClipboardText(_THIS) {
|
||||
result = (char *)SDL_malloc((length + 1) * sizeof(char));
|
||||
SDL_strlcpy(result, text, length + 1);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ SDL_bool HAIKU_HasClipboardText(_THIS) {
|
||||
if (text) {
|
||||
result = text[0] != '\0' ? SDL_TRUE : SDL_FALSE;
|
||||
SDL_free(text);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
#include "SDL_bevents.h"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
#include "SDL_bframebuffer.h"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
#include <SupportDefs.h>
|
||||
#include <support/UTF8.h>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
|
||||
/* For application signature. */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
#include <AppKit.h>
|
||||
#include <InterfaceKit.h>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU && SDL_VIDEO_OPENGL
|
||||
#if defined(SDL_VIDEO_DRIVER_HAIKU) && SDL_VIDEO_OPENGL
|
||||
|
||||
#include "SDL_bopengl.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef SDL_BOPENGL_H
|
||||
#define SDL_BOPENGL_H
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU && SDL_VIDEO_OPENGL
|
||||
#if defined(SDL_VIDEO_DRIVER_HAIKU) && SDL_VIDEO_OPENGL
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "SDL_internal.h"
|
||||
#include "../../core/haiku/SDL_BApp.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
#include "SDL_BWin.h"
|
||||
#include <Url.h>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
#include "SDL_BWin.h"
|
||||
|
||||
Reference in New Issue
Block a user