Initial support for building for Windows with OpenWatcom

This commit is contained in:
Cameron Cawley
2022-05-18 20:20:03 +01:00
committed by Ozkan Sezer
parent 5ef36ead08
commit 9dfa000bc0
12 changed files with 346 additions and 38 deletions

View File

@@ -30,6 +30,8 @@
#ifndef UNICODE
#define UNICODE 1
#endif
#undef WINVER
#define WINVER 0x0501
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x501 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices(), 0x501 for raw input */
#endif

View File

@@ -61,7 +61,7 @@
#define SDL_DYNAMIC_API 0 /* vitasdk doesn't support dynamic linking */
#elif defined(__NGAGE__)
#define SDL_DYNAMIC_API 0 /* The N-Gage doesn't support dynamic linking either */
#elif defined(__OS2__)
#elif defined(__OS2__) || defined(__WATCOMC__)
#define SDL_DYNAMIC_API 0 /* see github bugs #5667 and #5669 */
#elif defined(DYNAPI_NEEDS_DLOPEN) && !defined(HAVE_DLOPEN)
#define SDL_DYNAMIC_API 0 /* we need dlopen(), but don't have it.... */

View File

@@ -41,6 +41,13 @@
#include "SDL_shaders_d3d.h"
#ifdef __WATCOMC__
/* FIXME: Remove this once https://github.com/open-watcom/open-watcom-v2/pull/868 is merged */
#define D3DBLENDOP_REVSUBTRACT 3
/* FIXME: Remove this once https://github.com/open-watcom/open-watcom-v2/pull/869 is merged */
#define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_D3DHRESULT( 2073 )
#endif
typedef struct
{
SDL_Rect viewport;

View File

@@ -35,6 +35,22 @@
#include "SDL_windowsshape.h"
#include "SDL_windowsvulkan.h"
#ifdef D3D_DEBUG_INFO
#ifndef D3D_SDK_VERSION
#define D3D_SDK_VERSION (32 | 0x80000000)
#endif
#ifndef D3D9b_SDK_VERSION
#define D3D9b_SDK_VERSION (31 | 0x80000000)
#endif
#else /**/
#ifndef D3D_SDK_VERSION
#define D3D_SDK_VERSION 32
#endif
#ifndef D3D9b_SDK_VERSION
#define D3D9b_SDK_VERSION 31
#endif
#endif
/* Initialization/Query functions */
static int WIN_VideoInit(_THIS);
static void WIN_VideoQuit(_THIS);