From 03f8528315fa46c95991a34f3325d7b33ae5538c Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Sat, 02 May 2020 21:48:36 +0000
Subject: [PATCH] Update source to SDL2 2.0.12

---
 source/src/video/haiku/SDL_bwindow.cc |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/source/src/video/haiku/SDL_bwindow.cc b/source/src/video/haiku/SDL_bwindow.cc
index 142a3fa..addf206 100644
--- a/source/src/video/haiku/SDL_bwindow.cc
+++ b/source/src/video/haiku/SDL_bwindow.cc
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -25,6 +25,8 @@
 
 #include "SDL_BWin.h"
 #include <new>
+
+#include "SDL_syswm.h"
 
 /* Define a path to window's BWIN data */
 #ifdef __cplusplus
@@ -217,7 +219,15 @@
 SDL_bool HAIKU_GetWindowWMInfo(_THIS, SDL_Window * window,
                                     struct SDL_SysWMinfo *info) {
     /* FIXME: What is the point of this? What information should be included? */
-    return SDL_FALSE;
+	if (info->version.major == SDL_MAJOR_VERSION &&
+	    info->version.minor == SDL_MINOR_VERSION) {
+	    info->subsystem = SDL_SYSWM_HAIKU;
+	    return SDL_TRUE;
+	} else {
+	    SDL_SetError("Application not compiled with SDL %d.%d",
+	                 SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
+	    return SDL_FALSE;
+	}
 }
 
 

--
Gitblit v1.9.3