d3d8 too
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit

This commit is contained in:
IoIxD 2026-09-17 21:44:55 -07:00
commit 9a6a0e7393
12 changed files with 354 additions and 65 deletions

55
include/Mw/Widget/D3D8.h Normal file
View file

@ -0,0 +1,55 @@
/*!
* @file Mw/Widget/D3D8.h
* @brief D3D8 widget.
* @warning Only avaliable on Windows.
*/
#ifndef __MW_WIDGET_D3D8_H__
#define __MW_WIDGET_D3D8_H__
#include <Mw/Core.h>
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#if !defined(MW_D3D8_NO_INCLUDE)
/* https://github.com/microsoft/Windows-classic-samples/issues/317 */
#if defined(__MINGW32__) || defined(__MINGW64__)
#define NTDDI_VERSION 0x07000000
#define _WIN32_WINNT 0x0A00
#endif
#endif
#ifndef _WIN32
#error D3D8 widget only avaliable for Win32 backends
#else
#ifdef MW_DIRECTX8
#include <d3d8.h>
#endif
#endif
/*!
* @brief D3D8 widget class
*/
MWDECL MwClass MwD3D8Class;
#ifdef __cplusplus
extern "C" {
#endif
MwInline LPDIRECT3D8 MwDirectXGetD3D8(MwWidget handle) {
LPDIRECT3D8 out = NULL;
MwVaWidgetExecute(handle, "mwDirectXGetD3D8", &out, NULL);
return out;
};
MwInline LPDIRECT3DDEVICE8 MwDirectXGetD3Dev8(MwWidget handle) {
LPDIRECT3DDEVICE8 out = NULL;
MwVaWidgetExecute(handle, "mwDirectXGetD3Dev8", &out);
return out;
};
#ifdef __cplusplus
}
#endif
#endif

View file

@ -3,27 +3,28 @@
* @brief DirectX widget.
* @warning Only avaliable on Windows.
*/
#ifndef __MW_WIDGET_DIRECTX_H__
#define __MW_WIDGET_DIRECTX_H__
#ifndef __MW_WIDGET_D3D9_H__
#define __MW_WIDGET_D3D9_H__
#include <Mw/Core.h>
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#if !defined(MW_DIRECTX_NO_INCLUDE)
#if !defined(MW_D3D9_NO_INCLUDE)
/* https://github.com/microsoft/Windows-classic-samples/issues/317 */
#if defined(__MINGW32__) || defined(__MINGW64__)
#define NTDDI_VERSION 0x07000000
#define _WIN32_WINNT 0x0A00
#endif
#include <d3d9.h>
#endif
#ifndef _WIN32
#error DirectX widget only avaliable for Win32 backends
#error D3D9 widget only avaliable for Win32 backends
#else
#ifdef MW_DIRECTX9
#include <d3d9.h>
#endif
#endif
#endif
/*!