From d7cf18b46083b6b30d407ffa31444086ea263b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Malde?= Date: Wed, 7 Oct 2020 14:13:03 +0200 Subject: groups/251.native_packages_lib.group: sdl2: bump to v2.0.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lucio Andrés Illanes Albornoz --- patches/sdl2-2.0.12.local.patch | 302 ++++++++++++++++++++++++++++++++++++ patches/sdl2-2.0.12_pre.local.patch | 138 ++++++++++++++++ patches/sdl2-2.0.8.local.patch | 302 ------------------------------------ patches/sdl2-2.0.8_pre.local.patch | 127 --------------- patches/sdl2/alignment.patch | 18 +++ patches/sdl2/dynapi.patch | 85 ++++++++++ patches/sdl2/iconv.patch | 10 +- patches/sdl2/u16.patch | 112 +++++-------- patches/sdl2/wchar.patch | 40 +++-- patches/sdl2/win32.patch | 15 ++ 10 files changed, 622 insertions(+), 527 deletions(-) create mode 100644 patches/sdl2-2.0.12.local.patch create mode 100644 patches/sdl2-2.0.12_pre.local.patch delete mode 100644 patches/sdl2-2.0.8.local.patch delete mode 100644 patches/sdl2-2.0.8_pre.local.patch create mode 100644 patches/sdl2/alignment.patch create mode 100644 patches/sdl2/dynapi.patch (limited to 'patches') diff --git a/patches/sdl2-2.0.12.local.patch b/patches/sdl2-2.0.12.local.patch new file mode 100644 index 00000000..cb64946a --- /dev/null +++ b/patches/sdl2-2.0.12.local.patch @@ -0,0 +1,302 @@ +diff -ru SDL2-2.0.8.orig/src/video/windows/SDL_windowskeyboard.c SDL2-2.0.8/src/video/windows/SDL_windowskeyboard.c +--- SDL2-2.0.8.orig/src/video/windows/SDL_windowskeyboard.c 2018-03-01 17:34:43.000000000 +0100 ++++ SDL2-2.0.8/src/video/windows/SDL_windowskeyboard.c 2020-10-05 20:39:13.169351110 +0200 +@@ -28,7 +28,10 @@ + #include "../../events/scancodes_windows.h" + + #include +-#include ++ ++#ifndef CFS_FORCE_POSITION ++#define CFS_FORCE_POSITION 0x0020 ++#endif + + #ifndef SDL_DISABLE_WINDOWS_IME + static void IME_Init(SDL_VideoData *videodata, HWND hwnd); +diff -ru SDL2-2.0.8.orig/src/video/windows/SDL_msctf.h SDL2-2.0.8/src/video/windows/SDL_msctf.h +--- SDL2-2.0.8.orig/src/video/windows/SDL_msctf.h 2018-03-01 17:34:43.000000000 +0100 ++++ SDL2-2.0.8/src/video/windows/SDL_msctf.h 2020-10-04 12:38:34.746446128 +0200 +@@ -22,7 +22,18 @@ + #ifndef SDL_msctf_h_ + #define SDL_msctf_h_ + +-#include ++#include ++#include ++typedef uint16_t* BSTR; ++typedef DWORD HIMCC; ++#define NEAR ++#define FAR ++typedef struct tagCANDIDATEFORM { ++ DWORD dwIndex; ++ DWORD dwStyle; ++ POINT ptCurrentPos; ++ RECT rcArea; ++} CANDIDATEFORM,*PCANDIDATEFORM,*NPCANDIDATEFORM,*LPCANDIDATEFORM; + + #define TF_INVALID_COOKIE (0xffffffff) + #define TF_IPSINK_FLAG_ACTIVE 0x0001 +@@ -53,20 +53,20 @@ + + typedef struct ITfThreadMgrVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgr *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgr *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgr *); +- HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgr *, TfClientId *); +- HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgr *); +- HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgr *); +- HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgr *, IEnumTfDocumentMgrs **); +- HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgr *, ITfDocumentMgr **); +- HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgr *, ITfDocumentMgr *); +- HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgr *, HWND, ITfDocumentMgr *, ITfDocumentMgr **); +- HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgr *, BOOL *); +- HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgr *, REFCLSID, ITfFunctionProvider **); +- HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgr *, IEnumTfFunctionProviders **); +- HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **); ++ HRESULT (__stdcall *QueryInterface)(ITfThreadMgr *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfThreadMgr *); ++ ULONG (__stdcall *Release)(ITfThreadMgr *); ++ HRESULT (__stdcall *Activate)(ITfThreadMgr *, TfClientId *); ++ HRESULT (__stdcall *Deactivate)(ITfThreadMgr *); ++ HRESULT (__stdcall *CreateDocumentMgr)(ITfThreadMgr *); ++ HRESULT (__stdcall *EnumDocumentMgrs)(ITfThreadMgr *, IEnumTfDocumentMgrs **); ++ HRESULT (__stdcall *GetFocus)(ITfThreadMgr *, ITfDocumentMgr **); ++ HRESULT (__stdcall *SetFocus)(ITfThreadMgr *, ITfDocumentMgr *); ++ HRESULT (__stdcall *AssociateFocus)(ITfThreadMgr *, HWND, ITfDocumentMgr *, ITfDocumentMgr **); ++ HRESULT (__stdcall *IsThreadFocus)(ITfThreadMgr *, BOOL *); ++ HRESULT (__stdcall *GetFunctionProvider)(ITfThreadMgr *, REFCLSID, ITfFunctionProvider **); ++ HRESULT (__stdcall *EnumFunctionProviders)(ITfThreadMgr *, IEnumTfFunctionProviders **); ++ HRESULT (__stdcall *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **); + } ITfThreadMgrVtbl; + + struct ITfThreadMgr +@@ -76,22 +76,22 @@ + + typedef struct ITfThreadMgrExVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgrEx *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgrEx *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgrEx *); +- HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgrEx *, TfClientId *); +- HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgrEx *); +- HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgrEx *, ITfDocumentMgr **); +- HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgrEx *, IEnumTfDocumentMgrs **); +- HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgrEx *, ITfDocumentMgr **); +- HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgrEx *, ITfDocumentMgr *); +- HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgrEx *, ITfDocumentMgr *, ITfDocumentMgr **); +- HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgrEx *, BOOL *); +- HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgrEx *, REFCLSID, ITfFunctionProvider **); +- HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgrEx *, IEnumTfFunctionProviders **); +- HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgrEx *, ITfCompartmentMgr **); +- HRESULT (STDMETHODCALLTYPE *ActivateEx)(ITfThreadMgrEx *, TfClientId *, DWORD); +- HRESULT (STDMETHODCALLTYPE *GetActiveFlags)(ITfThreadMgrEx *, DWORD *); ++ HRESULT (__stdcall *QueryInterface)(ITfThreadMgrEx *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfThreadMgrEx *); ++ ULONG (__stdcall *Release)(ITfThreadMgrEx *); ++ HRESULT (__stdcall *Activate)(ITfThreadMgrEx *, TfClientId *); ++ HRESULT (__stdcall *Deactivate)(ITfThreadMgrEx *); ++ HRESULT (__stdcall *CreateDocumentMgr)(ITfThreadMgrEx *, ITfDocumentMgr **); ++ HRESULT (__stdcall *EnumDocumentMgrs)(ITfThreadMgrEx *, IEnumTfDocumentMgrs **); ++ HRESULT (__stdcall *GetFocus)(ITfThreadMgrEx *, ITfDocumentMgr **); ++ HRESULT (__stdcall *SetFocus)(ITfThreadMgrEx *, ITfDocumentMgr *); ++ HRESULT (__stdcall *AssociateFocus)(ITfThreadMgrEx *, ITfDocumentMgr *, ITfDocumentMgr **); ++ HRESULT (__stdcall *IsThreadFocus)(ITfThreadMgrEx *, BOOL *); ++ HRESULT (__stdcall *GetFunctionProvider)(ITfThreadMgrEx *, REFCLSID, ITfFunctionProvider **); ++ HRESULT (__stdcall *EnumFunctionProviders)(ITfThreadMgrEx *, IEnumTfFunctionProviders **); ++ HRESULT (__stdcall *GetGlobalCompartment)(ITfThreadMgrEx *, ITfCompartmentMgr **); ++ HRESULT (__stdcall *ActivateEx)(ITfThreadMgrEx *, TfClientId *, DWORD); ++ HRESULT (__stdcall *GetActiveFlags)(ITfThreadMgrEx *, DWORD *); + } ITfThreadMgrExVtbl; + + struct ITfThreadMgrEx +@@ -101,15 +101,15 @@ + + typedef struct ITfDocumentMgrVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfDocumentMgr *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfDocumentMgr *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfDocumentMgr *); +- HRESULT (STDMETHODCALLTYPE *CreateContext)(ITfDocumentMgr *, TfClientId, DWORD, IUnknown *, ITfContext **, TfEditCookie *); +- HRESULT (STDMETHODCALLTYPE *Push)(ITfDocumentMgr *, ITfContext *); +- HRESULT (STDMETHODCALLTYPE *Pop)(ITfDocumentMgr *); +- HRESULT (STDMETHODCALLTYPE *GetTop)(ITfDocumentMgr *, ITfContext **); +- HRESULT (STDMETHODCALLTYPE *GetBase)(ITfDocumentMgr *, ITfContext **); +- HRESULT (STDMETHODCALLTYPE *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **); ++ HRESULT (__stdcall *QueryInterface)(ITfDocumentMgr *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfDocumentMgr *); ++ ULONG (__stdcall *Release)(ITfDocumentMgr *); ++ HRESULT (__stdcall *CreateContext)(ITfDocumentMgr *, TfClientId, DWORD, IUnknown *, ITfContext **, TfEditCookie *); ++ HRESULT (__stdcall *Push)(ITfDocumentMgr *, ITfContext *); ++ HRESULT (__stdcall *Pop)(ITfDocumentMgr *); ++ HRESULT (__stdcall *GetTop)(ITfDocumentMgr *, ITfContext **); ++ HRESULT (__stdcall *GetBase)(ITfDocumentMgr *, ITfContext **); ++ HRESULT (__stdcall *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **); + } ITfDocumentMgrVtbl; + + struct ITfDocumentMgr +@@ -119,12 +119,12 @@ + + typedef struct ITfUIElementSinkVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementSink *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementSink *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementSink *); +- HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementSink *, DWORD, BOOL *); +- HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementSink *, DWORD); +- HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementSink *, DWORD); ++ HRESULT (__stdcall *QueryInterface)(ITfUIElementSink *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfUIElementSink *); ++ ULONG (__stdcall *Release)(ITfUIElementSink *); ++ HRESULT (__stdcall *BeginUIElement)(ITfUIElementSink *, DWORD, BOOL *); ++ HRESULT (__stdcall *UpdateUIElement)(ITfUIElementSink *, DWORD); ++ HRESULT (__stdcall *EndUIElement)(ITfUIElementSink *, DWORD); + } ITfUIElementSinkVtbl; + + struct ITfUIElementSink +@@ -134,14 +134,14 @@ + + typedef struct ITfUIElementMgrVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementMgr *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementMgr *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementMgr *); +- HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementMgr *, ITfUIElement *, BOOL *, DWORD *); +- HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementMgr *, DWORD); +- HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementMgr *, DWORD); +- HRESULT (STDMETHODCALLTYPE *GetUIElement)(ITfUIElementMgr *, DWORD, ITfUIElement **); +- HRESULT (STDMETHODCALLTYPE *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **); ++ HRESULT (__stdcall *QueryInterface)(ITfUIElementMgr *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfUIElementMgr *); ++ ULONG (__stdcall *Release)(ITfUIElementMgr *); ++ HRESULT (__stdcall *BeginUIElement)(ITfUIElementMgr *, ITfUIElement *, BOOL *, DWORD *); ++ HRESULT (__stdcall *UpdateUIElement)(ITfUIElementMgr *, DWORD); ++ HRESULT (__stdcall *EndUIElement)(ITfUIElementMgr *, DWORD); ++ HRESULT (__stdcall *GetUIElement)(ITfUIElementMgr *, DWORD, ITfUIElement **); ++ HRESULT (__stdcall *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **); + } ITfUIElementMgrVtbl; + + struct ITfUIElementMgr +@@ -151,21 +151,21 @@ + + typedef struct ITfCandidateListUIElementVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfCandidateListUIElement *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfCandidateListUIElement *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfCandidateListUIElement *); +- HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfCandidateListUIElement *, BSTR *); +- HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfCandidateListUIElement *, GUID *); +- HRESULT (STDMETHODCALLTYPE *Show)(ITfCandidateListUIElement *, BOOL); +- HRESULT (STDMETHODCALLTYPE *IsShown)(ITfCandidateListUIElement *, BOOL *); +- HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfCandidateListUIElement *, DWORD *); +- HRESULT (STDMETHODCALLTYPE *GetDocumentMgr)(ITfCandidateListUIElement *, ITfDocumentMgr **); +- HRESULT (STDMETHODCALLTYPE *GetCount)(ITfCandidateListUIElement *, UINT *); +- HRESULT (STDMETHODCALLTYPE *GetSelection)(ITfCandidateListUIElement *, UINT *); +- HRESULT (STDMETHODCALLTYPE *GetString)(ITfCandidateListUIElement *, UINT, BSTR *); +- HRESULT (STDMETHODCALLTYPE *GetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT, UINT *); +- HRESULT (STDMETHODCALLTYPE *SetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT); +- HRESULT (STDMETHODCALLTYPE *GetCurrentPage)(ITfCandidateListUIElement *, UINT *); ++ HRESULT (__stdcall *QueryInterface)(ITfCandidateListUIElement *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfCandidateListUIElement *); ++ ULONG (__stdcall *Release)(ITfCandidateListUIElement *); ++ HRESULT (__stdcall *GetDescription)(ITfCandidateListUIElement *, BSTR *); ++ HRESULT (__stdcall *GetGUID)(ITfCandidateListUIElement *, GUID *); ++ HRESULT (__stdcall *Show)(ITfCandidateListUIElement *, BOOL); ++ HRESULT (__stdcall *IsShown)(ITfCandidateListUIElement *, BOOL *); ++ HRESULT (__stdcall *GetUpdatedFlags)(ITfCandidateListUIElement *, DWORD *); ++ HRESULT (__stdcall *GetDocumentMgr)(ITfCandidateListUIElement *, ITfDocumentMgr **); ++ HRESULT (__stdcall *GetCount)(ITfCandidateListUIElement *, UINT *); ++ HRESULT (__stdcall *GetSelection)(ITfCandidateListUIElement *, UINT *); ++ HRESULT (__stdcall *GetString)(ITfCandidateListUIElement *, UINT, BSTR *); ++ HRESULT (__stdcall *GetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT, UINT *); ++ HRESULT (__stdcall *SetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT); ++ HRESULT (__stdcall *GetCurrentPage)(ITfCandidateListUIElement *, UINT *); + } ITfCandidateListUIElementVtbl; + + struct ITfCandidateListUIElement +@@ -175,19 +175,19 @@ + + typedef struct ITfReadingInformationUIElementVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfReadingInformationUIElement *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfReadingInformationUIElement *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfReadingInformationUIElement *); +- HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfReadingInformationUIElement *, BSTR *); +- HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfReadingInformationUIElement *, GUID *); +- HRESULT (STDMETHODCALLTYPE *Show)(ITfReadingInformationUIElement *, BOOL); +- HRESULT (STDMETHODCALLTYPE *IsShown)(ITfReadingInformationUIElement *, BOOL *); +- HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfReadingInformationUIElement *, DWORD *); +- HRESULT (STDMETHODCALLTYPE *GetContext)(ITfReadingInformationUIElement *, ITfContext **); +- HRESULT (STDMETHODCALLTYPE *GetString)(ITfReadingInformationUIElement *, BSTR *); +- HRESULT (STDMETHODCALLTYPE *GetMaxReadingStringLength)(ITfReadingInformationUIElement *, UINT *); +- HRESULT (STDMETHODCALLTYPE *GetErrorIndex)(ITfReadingInformationUIElement *, UINT *); +- HRESULT (STDMETHODCALLTYPE *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *); ++ HRESULT (__stdcall *QueryInterface)(ITfReadingInformationUIElement *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfReadingInformationUIElement *); ++ ULONG (__stdcall *Release)(ITfReadingInformationUIElement *); ++ HRESULT (__stdcall *GetDescription)(ITfReadingInformationUIElement *, BSTR *); ++ HRESULT (__stdcall *GetGUID)(ITfReadingInformationUIElement *, GUID *); ++ HRESULT (__stdcall *Show)(ITfReadingInformationUIElement *, BOOL); ++ HRESULT (__stdcall *IsShown)(ITfReadingInformationUIElement *, BOOL *); ++ HRESULT (__stdcall *GetUpdatedFlags)(ITfReadingInformationUIElement *, DWORD *); ++ HRESULT (__stdcall *GetContext)(ITfReadingInformationUIElement *, ITfContext **); ++ HRESULT (__stdcall *GetString)(ITfReadingInformationUIElement *, BSTR *); ++ HRESULT (__stdcall *GetMaxReadingStringLength)(ITfReadingInformationUIElement *, UINT *); ++ HRESULT (__stdcall *GetErrorIndex)(ITfReadingInformationUIElement *, UINT *); ++ HRESULT (__stdcall *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *); + } ITfReadingInformationUIElementVtbl; + + struct ITfReadingInformationUIElement +@@ -197,13 +197,13 @@ + + typedef struct ITfUIElementVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElement *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElement *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfUIElement *); +- HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfUIElement *, BSTR *); +- HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfUIElement *, GUID *); +- HRESULT (STDMETHODCALLTYPE *Show)(ITfUIElement *, BOOL); +- HRESULT (STDMETHODCALLTYPE *IsShown)(ITfUIElement *, BOOL *); ++ HRESULT (__stdcall *QueryInterface)(ITfUIElement *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfUIElement *); ++ ULONG (__stdcall *Release)(ITfUIElement *); ++ HRESULT (__stdcall *GetDescription)(ITfUIElement *, BSTR *); ++ HRESULT (__stdcall *GetGUID)(ITfUIElement *, GUID *); ++ HRESULT (__stdcall *Show)(ITfUIElement *, BOOL); ++ HRESULT (__stdcall *IsShown)(ITfUIElement *, BOOL *); + } ITfUIElementVtbl; + + struct ITfUIElement +@@ -213,10 +213,10 @@ + + typedef struct ITfInputProcessorProfileActivationSinkVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfInputProcessorProfileActivationSink *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfInputProcessorProfileActivationSink *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfInputProcessorProfileActivationSink *); +- HRESULT (STDMETHODCALLTYPE *OnActivated)(ITfInputProcessorProfileActivationSink *, DWORD, LANGID, REFCLSID, REFGUID, REFGUID, HKL, DWORD); ++ HRESULT (__stdcall *QueryInterface)(ITfInputProcessorProfileActivationSink *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfInputProcessorProfileActivationSink *); ++ ULONG (__stdcall *Release)(ITfInputProcessorProfileActivationSink *); ++ HRESULT (__stdcall *OnActivated)(ITfInputProcessorProfileActivationSink *, DWORD, LANGID, REFCLSID, REFGUID, REFGUID, HKL, DWORD); + + } ITfInputProcessorProfileActivationSinkVtbl; + +@@ -227,11 +227,11 @@ + + typedef struct ITfSourceVtbl + { +- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfSource *, REFIID, void **); +- ULONG (STDMETHODCALLTYPE *AddRef)(ITfSource *); +- ULONG (STDMETHODCALLTYPE *Release)(ITfSource *); +- HRESULT (STDMETHODCALLTYPE *AdviseSink)(ITfSource *, REFIID, IUnknown *, DWORD *); +- HRESULT (STDMETHODCALLTYPE *UnadviseSink)(ITfSource *, DWORD); ++ HRESULT (__stdcall *QueryInterface)(ITfSource *, REFIID, void **); ++ ULONG (__stdcall *AddRef)(ITfSource *); ++ ULONG (__stdcall *Release)(ITfSource *); ++ HRESULT (__stdcall *AdviseSink)(ITfSource *, REFIID, IUnknown *, DWORD *); ++ HRESULT (__stdcall *UnadviseSink)(ITfSource *, DWORD); + } ITfSourceVtbl; + + struct ITfSource diff --git a/patches/sdl2-2.0.12_pre.local.patch b/patches/sdl2-2.0.12_pre.local.patch new file mode 100644 index 00000000..47caeaf3 --- /dev/null +++ b/patches/sdl2-2.0.12_pre.local.patch @@ -0,0 +1,138 @@ +diff -ru SDL2-2.0.12.orig/configure.ac SDL2-2.0.12/configure.ac +--- SDL2-2.0.12.orig/configure.ac 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/configure.ac 2020-10-07 12:42:16.906014070 +0200 +@@ -1332,7 +1332,7 @@ + CFLAGS="$save_CFLAGS" + + if test x$have_arm_simd = xyes; then +- AC_DEFINE(SDL_ARM_SIMD_BLITTERS) ++ AC_DEFINE([SDL_ARM_SIMD_BLITTERS], [1], [ ]) + dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c" + SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S" + WARN_ABOUT_ARM_SIMD_ASM_MIT="yes" +@@ -1371,7 +1371,7 @@ + CFLAGS="$save_CFLAGS" + + if test x$have_arm_neon = xyes; then +- AC_DEFINE(SDL_ARM_NEON_BLITTERS) ++ AC_DEFINE([SDL_ARM_NEON_BLITTERS], [1], [ ]) + dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.c" + SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S" + WARN_ABOUT_ARM_NEON_ASM_MIT="yes" +@@ -1927,7 +1927,7 @@ + XITouchClassInfo *t; + ],[ + have_xinput2_multitouch=yes +- AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, []) ++ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [1], [ ]) + SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch" + ]) + AC_MSG_RESULT($have_xinput2_multitouch) +@@ -3094,11 +3094,11 @@ + + AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes) + if test x$have_wasapi = xyes; then +- AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[]) ++ AC_DEFINE([HAVE_MMDEVICEAPI_H], [1], [ ]) + fi + AC_CHECK_HEADER(audioclient.h,,have_wasapi=no) + if test x$have_wasapi = xyes; then +- AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[]) ++ AC_DEFINE([HAVE_AUDIOCLIENT_H], [1], [ ]) + fi + + AC_ARG_ENABLE(wasapi, +diff -ru SDL2-2.0.8.orig/configure.in SDL2-2.0.8/configure.in +--- SDL2-2.0.8.orig/configure.in 2018-03-01 17:34:41.000000000 +0100 ++++ SDL2-2.0.8/configure.ac 2020-09-27 15:02:24.837099348 +0200 +@@ -2770,6 +2769,10 @@ + pthread_cflags="-D_REENTRANT" + pthread_lib="-lpthread" + ;; ++ *-*-midipix*) ++ pthread_cflags="-D_REENTRANT" ++ pthread_lib="" ++ ;; + *-*-bsdi*) + pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" + pthread_lib="" +@@ -3484,6 +3487,67 @@ + # Set up other core UNIX files + SOURCES="$SOURCES $srcdir/src/core/unix/*.c" + ;; ++ *-*-midipix*) ++ ARCH=midipix ++ ++ CheckWINDOWS ++ # TODO: oh dear. ++ #CheckWINDOWSGL ++ #CheckWINDOWSGLES ++ #CheckVulkan ++ CheckDIRECTX ++ CheckVisibilityHidden ++ CheckDeclarationAfterStatement ++ CheckDummyVideo ++ CheckDiskAudio ++ CheckDummyAudio ++ CheckDLOPEN ++ CheckPTHREAD ++ CheckClockGettime ++ ++ # Set up files for the video library ++ if test x$enable_video = xyes; then ++ AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ]) ++ SOURCES="$SOURCES $srcdir/src/video/windows/*.c" ++ have_video=yes ++ AC_ARG_ENABLE(render-d3d, ++AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]), ++ , enable_render_d3d=yes) ++ if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then ++ AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ]) ++ fi ++ if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then ++ AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ]) ++ fi ++ fi ++ ++ # Set up files for the audio library ++ # TODO: wasapi is missing entirely still ++ ++ # Set up files for the haptic library ++ # TODO: not sure. ++ ++ # Set up files for the power library ++ if test x$enable_power = xyes; then ++ AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ]) ++ SOURCES="$SOURCES $srcdir/src/power/windows/*.c" ++ have_power=yes ++ fi ++ # Set up files for the filesystem library ++ if test x$enable_filesystem = xyes; then ++ AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ]) ++ SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c" ++ have_filesystem=yes ++ fi ++ # Set up files for the timer library ++ if test x$enable_timers = xyes; then ++ AC_DEFINE(SDL_TIMER_UNIX, 1, [ ]) ++ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c" ++ have_timers=yes ++ fi ++ ++ SOURCES="$SOURCES $srcdir/src/core/unix/*.c" ++ ;; + *-*-cygwin* | *-*-mingw32*) + ARCH=win32 + if test "$build" != "$host"; then # cross-compiling +diff -ru SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c SDL2-2.0.8/src/dynapi/SDL_dynapi.c +--- SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c 2018-03-01 17:34:42.000000000 +0100 ++++ SDL2-2.0.8/src/dynapi/SDL_dynapi.c 2020-09-27 14:14:34.616542401 +0200 +@@ -222,7 +222,7 @@ + return retval; + } + +-#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__) ++#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__) || defined(__midipix__) + #include + static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym) + { diff --git a/patches/sdl2-2.0.8.local.patch b/patches/sdl2-2.0.8.local.patch deleted file mode 100644 index cb64946a..00000000 --- a/patches/sdl2-2.0.8.local.patch +++ /dev/null @@ -1,302 +0,0 @@ -diff -ru SDL2-2.0.8.orig/src/video/windows/SDL_windowskeyboard.c SDL2-2.0.8/src/video/windows/SDL_windowskeyboard.c ---- SDL2-2.0.8.orig/src/video/windows/SDL_windowskeyboard.c 2018-03-01 17:34:43.000000000 +0100 -+++ SDL2-2.0.8/src/video/windows/SDL_windowskeyboard.c 2020-10-05 20:39:13.169351110 +0200 -@@ -28,7 +28,10 @@ - #include "../../events/scancodes_windows.h" - - #include --#include -+ -+#ifndef CFS_FORCE_POSITION -+#define CFS_FORCE_POSITION 0x0020 -+#endif - - #ifndef SDL_DISABLE_WINDOWS_IME - static void IME_Init(SDL_VideoData *videodata, HWND hwnd); -diff -ru SDL2-2.0.8.orig/src/video/windows/SDL_msctf.h SDL2-2.0.8/src/video/windows/SDL_msctf.h ---- SDL2-2.0.8.orig/src/video/windows/SDL_msctf.h 2018-03-01 17:34:43.000000000 +0100 -+++ SDL2-2.0.8/src/video/windows/SDL_msctf.h 2020-10-04 12:38:34.746446128 +0200 -@@ -22,7 +22,18 @@ - #ifndef SDL_msctf_h_ - #define SDL_msctf_h_ - --#include -+#include -+#include -+typedef uint16_t* BSTR; -+typedef DWORD HIMCC; -+#define NEAR -+#define FAR -+typedef struct tagCANDIDATEFORM { -+ DWORD dwIndex; -+ DWORD dwStyle; -+ POINT ptCurrentPos; -+ RECT rcArea; -+} CANDIDATEFORM,*PCANDIDATEFORM,*NPCANDIDATEFORM,*LPCANDIDATEFORM; - - #define TF_INVALID_COOKIE (0xffffffff) - #define TF_IPSINK_FLAG_ACTIVE 0x0001 -@@ -53,20 +53,20 @@ - - typedef struct ITfThreadMgrVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgr *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgr *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgr *); -- HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgr *, TfClientId *); -- HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgr *); -- HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgr *); -- HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgr *, IEnumTfDocumentMgrs **); -- HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgr *, ITfDocumentMgr **); -- HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgr *, ITfDocumentMgr *); -- HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgr *, HWND, ITfDocumentMgr *, ITfDocumentMgr **); -- HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgr *, BOOL *); -- HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgr *, REFCLSID, ITfFunctionProvider **); -- HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgr *, IEnumTfFunctionProviders **); -- HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **); -+ HRESULT (__stdcall *QueryInterface)(ITfThreadMgr *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfThreadMgr *); -+ ULONG (__stdcall *Release)(ITfThreadMgr *); -+ HRESULT (__stdcall *Activate)(ITfThreadMgr *, TfClientId *); -+ HRESULT (__stdcall *Deactivate)(ITfThreadMgr *); -+ HRESULT (__stdcall *CreateDocumentMgr)(ITfThreadMgr *); -+ HRESULT (__stdcall *EnumDocumentMgrs)(ITfThreadMgr *, IEnumTfDocumentMgrs **); -+ HRESULT (__stdcall *GetFocus)(ITfThreadMgr *, ITfDocumentMgr **); -+ HRESULT (__stdcall *SetFocus)(ITfThreadMgr *, ITfDocumentMgr *); -+ HRESULT (__stdcall *AssociateFocus)(ITfThreadMgr *, HWND, ITfDocumentMgr *, ITfDocumentMgr **); -+ HRESULT (__stdcall *IsThreadFocus)(ITfThreadMgr *, BOOL *); -+ HRESULT (__stdcall *GetFunctionProvider)(ITfThreadMgr *, REFCLSID, ITfFunctionProvider **); -+ HRESULT (__stdcall *EnumFunctionProviders)(ITfThreadMgr *, IEnumTfFunctionProviders **); -+ HRESULT (__stdcall *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **); - } ITfThreadMgrVtbl; - - struct ITfThreadMgr -@@ -76,22 +76,22 @@ - - typedef struct ITfThreadMgrExVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgrEx *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgrEx *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgrEx *); -- HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgrEx *, TfClientId *); -- HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgrEx *); -- HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgrEx *, ITfDocumentMgr **); -- HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgrEx *, IEnumTfDocumentMgrs **); -- HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgrEx *, ITfDocumentMgr **); -- HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgrEx *, ITfDocumentMgr *); -- HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgrEx *, ITfDocumentMgr *, ITfDocumentMgr **); -- HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgrEx *, BOOL *); -- HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgrEx *, REFCLSID, ITfFunctionProvider **); -- HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgrEx *, IEnumTfFunctionProviders **); -- HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgrEx *, ITfCompartmentMgr **); -- HRESULT (STDMETHODCALLTYPE *ActivateEx)(ITfThreadMgrEx *, TfClientId *, DWORD); -- HRESULT (STDMETHODCALLTYPE *GetActiveFlags)(ITfThreadMgrEx *, DWORD *); -+ HRESULT (__stdcall *QueryInterface)(ITfThreadMgrEx *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfThreadMgrEx *); -+ ULONG (__stdcall *Release)(ITfThreadMgrEx *); -+ HRESULT (__stdcall *Activate)(ITfThreadMgrEx *, TfClientId *); -+ HRESULT (__stdcall *Deactivate)(ITfThreadMgrEx *); -+ HRESULT (__stdcall *CreateDocumentMgr)(ITfThreadMgrEx *, ITfDocumentMgr **); -+ HRESULT (__stdcall *EnumDocumentMgrs)(ITfThreadMgrEx *, IEnumTfDocumentMgrs **); -+ HRESULT (__stdcall *GetFocus)(ITfThreadMgrEx *, ITfDocumentMgr **); -+ HRESULT (__stdcall *SetFocus)(ITfThreadMgrEx *, ITfDocumentMgr *); -+ HRESULT (__stdcall *AssociateFocus)(ITfThreadMgrEx *, ITfDocumentMgr *, ITfDocumentMgr **); -+ HRESULT (__stdcall *IsThreadFocus)(ITfThreadMgrEx *, BOOL *); -+ HRESULT (__stdcall *GetFunctionProvider)(ITfThreadMgrEx *, REFCLSID, ITfFunctionProvider **); -+ HRESULT (__stdcall *EnumFunctionProviders)(ITfThreadMgrEx *, IEnumTfFunctionProviders **); -+ HRESULT (__stdcall *GetGlobalCompartment)(ITfThreadMgrEx *, ITfCompartmentMgr **); -+ HRESULT (__stdcall *ActivateEx)(ITfThreadMgrEx *, TfClientId *, DWORD); -+ HRESULT (__stdcall *GetActiveFlags)(ITfThreadMgrEx *, DWORD *); - } ITfThreadMgrExVtbl; - - struct ITfThreadMgrEx -@@ -101,15 +101,15 @@ - - typedef struct ITfDocumentMgrVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfDocumentMgr *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfDocumentMgr *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfDocumentMgr *); -- HRESULT (STDMETHODCALLTYPE *CreateContext)(ITfDocumentMgr *, TfClientId, DWORD, IUnknown *, ITfContext **, TfEditCookie *); -- HRESULT (STDMETHODCALLTYPE *Push)(ITfDocumentMgr *, ITfContext *); -- HRESULT (STDMETHODCALLTYPE *Pop)(ITfDocumentMgr *); -- HRESULT (STDMETHODCALLTYPE *GetTop)(ITfDocumentMgr *, ITfContext **); -- HRESULT (STDMETHODCALLTYPE *GetBase)(ITfDocumentMgr *, ITfContext **); -- HRESULT (STDMETHODCALLTYPE *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **); -+ HRESULT (__stdcall *QueryInterface)(ITfDocumentMgr *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfDocumentMgr *); -+ ULONG (__stdcall *Release)(ITfDocumentMgr *); -+ HRESULT (__stdcall *CreateContext)(ITfDocumentMgr *, TfClientId, DWORD, IUnknown *, ITfContext **, TfEditCookie *); -+ HRESULT (__stdcall *Push)(ITfDocumentMgr *, ITfContext *); -+ HRESULT (__stdcall *Pop)(ITfDocumentMgr *); -+ HRESULT (__stdcall *GetTop)(ITfDocumentMgr *, ITfContext **); -+ HRESULT (__stdcall *GetBase)(ITfDocumentMgr *, ITfContext **); -+ HRESULT (__stdcall *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **); - } ITfDocumentMgrVtbl; - - struct ITfDocumentMgr -@@ -119,12 +119,12 @@ - - typedef struct ITfUIElementSinkVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementSink *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementSink *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementSink *); -- HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementSink *, DWORD, BOOL *); -- HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementSink *, DWORD); -- HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementSink *, DWORD); -+ HRESULT (__stdcall *QueryInterface)(ITfUIElementSink *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfUIElementSink *); -+ ULONG (__stdcall *Release)(ITfUIElementSink *); -+ HRESULT (__stdcall *BeginUIElement)(ITfUIElementSink *, DWORD, BOOL *); -+ HRESULT (__stdcall *UpdateUIElement)(ITfUIElementSink *, DWORD); -+ HRESULT (__stdcall *EndUIElement)(ITfUIElementSink *, DWORD); - } ITfUIElementSinkVtbl; - - struct ITfUIElementSink -@@ -134,14 +134,14 @@ - - typedef struct ITfUIElementMgrVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementMgr *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementMgr *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementMgr *); -- HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementMgr *, ITfUIElement *, BOOL *, DWORD *); -- HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementMgr *, DWORD); -- HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementMgr *, DWORD); -- HRESULT (STDMETHODCALLTYPE *GetUIElement)(ITfUIElementMgr *, DWORD, ITfUIElement **); -- HRESULT (STDMETHODCALLTYPE *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **); -+ HRESULT (__stdcall *QueryInterface)(ITfUIElementMgr *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfUIElementMgr *); -+ ULONG (__stdcall *Release)(ITfUIElementMgr *); -+ HRESULT (__stdcall *BeginUIElement)(ITfUIElementMgr *, ITfUIElement *, BOOL *, DWORD *); -+ HRESULT (__stdcall *UpdateUIElement)(ITfUIElementMgr *, DWORD); -+ HRESULT (__stdcall *EndUIElement)(ITfUIElementMgr *, DWORD); -+ HRESULT (__stdcall *GetUIElement)(ITfUIElementMgr *, DWORD, ITfUIElement **); -+ HRESULT (__stdcall *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **); - } ITfUIElementMgrVtbl; - - struct ITfUIElementMgr -@@ -151,21 +151,21 @@ - - typedef struct ITfCandidateListUIElementVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfCandidateListUIElement *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfCandidateListUIElement *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfCandidateListUIElement *); -- HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfCandidateListUIElement *, BSTR *); -- HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfCandidateListUIElement *, GUID *); -- HRESULT (STDMETHODCALLTYPE *Show)(ITfCandidateListUIElement *, BOOL); -- HRESULT (STDMETHODCALLTYPE *IsShown)(ITfCandidateListUIElement *, BOOL *); -- HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfCandidateListUIElement *, DWORD *); -- HRESULT (STDMETHODCALLTYPE *GetDocumentMgr)(ITfCandidateListUIElement *, ITfDocumentMgr **); -- HRESULT (STDMETHODCALLTYPE *GetCount)(ITfCandidateListUIElement *, UINT *); -- HRESULT (STDMETHODCALLTYPE *GetSelection)(ITfCandidateListUIElement *, UINT *); -- HRESULT (STDMETHODCALLTYPE *GetString)(ITfCandidateListUIElement *, UINT, BSTR *); -- HRESULT (STDMETHODCALLTYPE *GetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT, UINT *); -- HRESULT (STDMETHODCALLTYPE *SetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT); -- HRESULT (STDMETHODCALLTYPE *GetCurrentPage)(ITfCandidateListUIElement *, UINT *); -+ HRESULT (__stdcall *QueryInterface)(ITfCandidateListUIElement *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfCandidateListUIElement *); -+ ULONG (__stdcall *Release)(ITfCandidateListUIElement *); -+ HRESULT (__stdcall *GetDescription)(ITfCandidateListUIElement *, BSTR *); -+ HRESULT (__stdcall *GetGUID)(ITfCandidateListUIElement *, GUID *); -+ HRESULT (__stdcall *Show)(ITfCandidateListUIElement *, BOOL); -+ HRESULT (__stdcall *IsShown)(ITfCandidateListUIElement *, BOOL *); -+ HRESULT (__stdcall *GetUpdatedFlags)(ITfCandidateListUIElement *, DWORD *); -+ HRESULT (__stdcall *GetDocumentMgr)(ITfCandidateListUIElement *, ITfDocumentMgr **); -+ HRESULT (__stdcall *GetCount)(ITfCandidateListUIElement *, UINT *); -+ HRESULT (__stdcall *GetSelection)(ITfCandidateListUIElement *, UINT *); -+ HRESULT (__stdcall *GetString)(ITfCandidateListUIElement *, UINT, BSTR *); -+ HRESULT (__stdcall *GetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT, UINT *); -+ HRESULT (__stdcall *SetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT); -+ HRESULT (__stdcall *GetCurrentPage)(ITfCandidateListUIElement *, UINT *); - } ITfCandidateListUIElementVtbl; - - struct ITfCandidateListUIElement -@@ -175,19 +175,19 @@ - - typedef struct ITfReadingInformationUIElementVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfReadingInformationUIElement *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfReadingInformationUIElement *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfReadingInformationUIElement *); -- HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfReadingInformationUIElement *, BSTR *); -- HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfReadingInformationUIElement *, GUID *); -- HRESULT (STDMETHODCALLTYPE *Show)(ITfReadingInformationUIElement *, BOOL); -- HRESULT (STDMETHODCALLTYPE *IsShown)(ITfReadingInformationUIElement *, BOOL *); -- HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfReadingInformationUIElement *, DWORD *); -- HRESULT (STDMETHODCALLTYPE *GetContext)(ITfReadingInformationUIElement *, ITfContext **); -- HRESULT (STDMETHODCALLTYPE *GetString)(ITfReadingInformationUIElement *, BSTR *); -- HRESULT (STDMETHODCALLTYPE *GetMaxReadingStringLength)(ITfReadingInformationUIElement *, UINT *); -- HRESULT (STDMETHODCALLTYPE *GetErrorIndex)(ITfReadingInformationUIElement *, UINT *); -- HRESULT (STDMETHODCALLTYPE *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *); -+ HRESULT (__stdcall *QueryInterface)(ITfReadingInformationUIElement *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfReadingInformationUIElement *); -+ ULONG (__stdcall *Release)(ITfReadingInformationUIElement *); -+ HRESULT (__stdcall *GetDescription)(ITfReadingInformationUIElement *, BSTR *); -+ HRESULT (__stdcall *GetGUID)(ITfReadingInformationUIElement *, GUID *); -+ HRESULT (__stdcall *Show)(ITfReadingInformationUIElement *, BOOL); -+ HRESULT (__stdcall *IsShown)(ITfReadingInformationUIElement *, BOOL *); -+ HRESULT (__stdcall *GetUpdatedFlags)(ITfReadingInformationUIElement *, DWORD *); -+ HRESULT (__stdcall *GetContext)(ITfReadingInformationUIElement *, ITfContext **); -+ HRESULT (__stdcall *GetString)(ITfReadingInformationUIElement *, BSTR *); -+ HRESULT (__stdcall *GetMaxReadingStringLength)(ITfReadingInformationUIElement *, UINT *); -+ HRESULT (__stdcall *GetErrorIndex)(ITfReadingInformationUIElement *, UINT *); -+ HRESULT (__stdcall *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *); - } ITfReadingInformationUIElementVtbl; - - struct ITfReadingInformationUIElement -@@ -197,13 +197,13 @@ - - typedef struct ITfUIElementVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElement *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElement *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfUIElement *); -- HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfUIElement *, BSTR *); -- HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfUIElement *, GUID *); -- HRESULT (STDMETHODCALLTYPE *Show)(ITfUIElement *, BOOL); -- HRESULT (STDMETHODCALLTYPE *IsShown)(ITfUIElement *, BOOL *); -+ HRESULT (__stdcall *QueryInterface)(ITfUIElement *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfUIElement *); -+ ULONG (__stdcall *Release)(ITfUIElement *); -+ HRESULT (__stdcall *GetDescription)(ITfUIElement *, BSTR *); -+ HRESULT (__stdcall *GetGUID)(ITfUIElement *, GUID *); -+ HRESULT (__stdcall *Show)(ITfUIElement *, BOOL); -+ HRESULT (__stdcall *IsShown)(ITfUIElement *, BOOL *); - } ITfUIElementVtbl; - - struct ITfUIElement -@@ -213,10 +213,10 @@ - - typedef struct ITfInputProcessorProfileActivationSinkVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfInputProcessorProfileActivationSink *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfInputProcessorProfileActivationSink *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfInputProcessorProfileActivationSink *); -- HRESULT (STDMETHODCALLTYPE *OnActivated)(ITfInputProcessorProfileActivationSink *, DWORD, LANGID, REFCLSID, REFGUID, REFGUID, HKL, DWORD); -+ HRESULT (__stdcall *QueryInterface)(ITfInputProcessorProfileActivationSink *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfInputProcessorProfileActivationSink *); -+ ULONG (__stdcall *Release)(ITfInputProcessorProfileActivationSink *); -+ HRESULT (__stdcall *OnActivated)(ITfInputProcessorProfileActivationSink *, DWORD, LANGID, REFCLSID, REFGUID, REFGUID, HKL, DWORD); - - } ITfInputProcessorProfileActivationSinkVtbl; - -@@ -227,11 +227,11 @@ - - typedef struct ITfSourceVtbl - { -- HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfSource *, REFIID, void **); -- ULONG (STDMETHODCALLTYPE *AddRef)(ITfSource *); -- ULONG (STDMETHODCALLTYPE *Release)(ITfSource *); -- HRESULT (STDMETHODCALLTYPE *AdviseSink)(ITfSource *, REFIID, IUnknown *, DWORD *); -- HRESULT (STDMETHODCALLTYPE *UnadviseSink)(ITfSource *, DWORD); -+ HRESULT (__stdcall *QueryInterface)(ITfSource *, REFIID, void **); -+ ULONG (__stdcall *AddRef)(ITfSource *); -+ ULONG (__stdcall *Release)(ITfSource *); -+ HRESULT (__stdcall *AdviseSink)(ITfSource *, REFIID, IUnknown *, DWORD *); -+ HRESULT (__stdcall *UnadviseSink)(ITfSource *, DWORD); - } ITfSourceVtbl; - - struct ITfSource diff --git a/patches/sdl2-2.0.8_pre.local.patch b/patches/sdl2-2.0.8_pre.local.patch deleted file mode 100644 index 5e870924..00000000 --- a/patches/sdl2-2.0.8_pre.local.patch +++ /dev/null @@ -1,127 +0,0 @@ -diff -ru SDL2-2.0.8.orig/configure.in SDL2-2.0.8/configure.in ---- SDL2-2.0.8.orig/configure.in 2018-03-01 17:34:41.000000000 +0100 -+++ SDL2-2.0.8/configure.in 2020-09-27 15:02:24.837099348 +0200 -@@ -1868,7 +1868,6 @@ - XITouchClassInfo *t; - ],[ - have_xinput2_multitouch=yes -- AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, []) - SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch" - ]) - AC_MSG_RESULT($have_xinput2_multitouch) -@@ -2770,6 +2769,10 @@ - pthread_cflags="-D_REENTRANT" - pthread_lib="-lpthread" - ;; -+ *-*-midipix*) -+ pthread_cflags="-D_REENTRANT" -+ pthread_lib="" -+ ;; - *-*-bsdi*) - pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" - pthread_lib="" -@@ -3484,6 +3487,67 @@ - # Set up other core UNIX files - SOURCES="$SOURCES $srcdir/src/core/unix/*.c" - ;; -+ *-*-midipix*) -+ ARCH=midipix -+ -+ CheckWINDOWS -+ # TODO: oh dear. -+ #CheckWINDOWSGL -+ #CheckWINDOWSGLES -+ #CheckVulkan -+ CheckDIRECTX -+ CheckVisibilityHidden -+ CheckDeclarationAfterStatement -+ CheckDummyVideo -+ CheckDiskAudio -+ CheckDummyAudio -+ CheckDLOPEN -+ CheckPTHREAD -+ CheckClockGettime -+ -+ # Set up files for the video library -+ if test x$enable_video = xyes; then -+ AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ]) -+ SOURCES="$SOURCES $srcdir/src/video/windows/*.c" -+ have_video=yes -+ AC_ARG_ENABLE(render-d3d, -+AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]), -+ , enable_render_d3d=yes) -+ if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then -+ AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ]) -+ fi -+ if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then -+ AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ]) -+ fi -+ fi -+ -+ # Set up files for the audio library -+ # TODO: wasapi is missing entirely still -+ -+ # Set up files for the haptic library -+ # TODO: not sure. -+ -+ # Set up files for the power library -+ if test x$enable_power = xyes; then -+ AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ]) -+ SOURCES="$SOURCES $srcdir/src/power/windows/*.c" -+ have_power=yes -+ fi -+ # Set up files for the filesystem library -+ if test x$enable_filesystem = xyes; then -+ AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ]) -+ SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c" -+ have_filesystem=yes -+ fi -+ # Set up files for the timer library -+ if test x$enable_timers = xyes; then -+ AC_DEFINE(SDL_TIMER_UNIX, 1, [ ]) -+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c" -+ have_timers=yes -+ fi -+ -+ SOURCES="$SOURCES $srcdir/src/core/unix/*.c" -+ ;; - *-*-cygwin* | *-*-mingw32*) - ARCH=win32 - if test "$build" != "$host"; then # cross-compiling -diff -ru SDL2-2.0.8.orig/Makefile.in SDL2-2.0.8/Makefile.in ---- SDL2-2.0.8.orig/Makefile.in 2018-03-01 17:34:41.000000000 +0100 -+++ SDL2-2.0.8/Makefile.in 2020-09-27 14:14:34.616542401 +0200 -@@ -124,7 +124,7 @@ - LT_REVISION = @LT_REVISION@ - LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) - --all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) -+all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) - - $(srcdir)/configure: $(srcdir)/configure.in - @echo "Warning, configure is out of date, please re-run autogen.sh" -@@ -167,11 +167,10 @@ - $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \ - fi - --install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) -+install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) - $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir) - $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET) - $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET) -- $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET) - install-data: - $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal - $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4 -diff -ru SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c SDL2-2.0.8/src/dynapi/SDL_dynapi.c ---- SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c 2018-03-01 17:34:42.000000000 +0100 -+++ SDL2-2.0.8/src/dynapi/SDL_dynapi.c 2020-09-27 14:14:34.616542401 +0200 -@@ -222,7 +222,7 @@ - return retval; - } - --#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__) -+#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__) || defined(__midipix__) - #include - static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym) - { diff --git a/patches/sdl2/alignment.patch b/patches/sdl2/alignment.patch new file mode 100644 index 00000000..091928d1 --- /dev/null +++ b/patches/sdl2/alignment.patch @@ -0,0 +1,18 @@ +diff -ru SDL2-2.0.12.orig/src/video/windows/SDL_windowstaskdialog.h SDL2-2.0.12/src/video/windows/SDL_windowstaskdialog.h +--- SDL2-2.0.12.orig/src/video/windows/SDL_windowstaskdialog.h 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/video/windows/SDL_windowstaskdialog.h 2020-10-07 13:45:15.231259024 +0200 +@@ -18,7 +18,7 @@ + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + */ +-#include ++#pragma pack(push,1) + + typedef HRESULT(CALLBACK *PFTASKDIALOGCALLBACK)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData); + +@@ -153,4 +153,4 @@ + UINT cxWidth; // width of the Task Dialog's client area in DLU's. If 0, Task Dialog will calculate the ideal width. + } TASKDIALOGCONFIG; + +-#include ++#pragma pack(pop) diff --git a/patches/sdl2/dynapi.patch b/patches/sdl2/dynapi.patch new file mode 100644 index 00000000..b2f175b8 --- /dev/null +++ b/patches/sdl2/dynapi.patch @@ -0,0 +1,85 @@ +diff -ru SDL2-2.0.12.orig/include/SDL_stdinc.h SDL2-2.0.12/include/SDL_stdinc.h +--- SDL2-2.0.12.orig/include/SDL_stdinc.h 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/include/SDL_stdinc.h 2020-10-07 12:59:08.970629028 +0200 +@@ -455,6 +455,16 @@ + extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); + extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); + ++#ifdef __midipix__ ++extern DECLSPEC size_t SDLCALL SDL_wcslen(const uint16_t *wstr); ++extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) uint16_t *dst, const uint16_t *src, size_t maxlen); ++extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) uint16_t *dst, const uint16_t *src, size_t maxlen); ++extern DECLSPEC uint16_t *SDLCALL SDL_wcsdup(const uint16_t *wstr); ++extern DECLSPEC uint16_t *SDLCALL SDL_wcsstr(const uint16_t *haystack, const uint16_t *needle); ++ ++extern DECLSPEC int SDLCALL SDL_wcscmp(const uint16_t *str1, const uint16_t *str2); ++extern DECLSPEC int SDLCALL SDL_wcsncmp(const uint16_t *str1, const uint16_t *str2, size_t maxlen); ++#else + extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); + extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); + extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); +@@ -463,6 +473,7 @@ + + extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2); + extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen); ++#endif + + extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str); + extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen); +diff -ru SDL2-2.0.12.orig/src/dynapi/SDL_dynapi_procs.h SDL2-2.0.12/src/dynapi/SDL_dynapi_procs.h +--- SDL2-2.0.12.orig/src/dynapi/SDL_dynapi_procs.h 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/dynapi/SDL_dynapi_procs.h 2020-10-07 13:19:40.863706330 +0200 +@@ -418,9 +418,15 @@ + SDL_DYNAPI_PROC(void*,SDL_memcpy,(SDL_OUT_BYTECAP(c) void *a, SDL_IN_BYTECAP(c) const void *b, size_t c),(a,b,c),return) + SDL_DYNAPI_PROC(void*,SDL_memmove,(SDL_OUT_BYTECAP(c) void *a, SDL_IN_BYTECAP(c) const void *b, size_t c),(a,b,c),return) + SDL_DYNAPI_PROC(int,SDL_memcmp,(const void *a, const void *b, size_t c),(a,b,c),return) ++#ifdef __midipix__ ++SDL_DYNAPI_PROC(size_t,SDL_wcslen,(const uint16_t *a),(a),return) ++SDL_DYNAPI_PROC(size_t,SDL_wcslcpy,(SDL_OUT_Z_CAP(c) uint16_t *a, const uint16_t *b, size_t c),(a,b,c),return) ++SDL_DYNAPI_PROC(size_t,SDL_wcslcat,(SDL_INOUT_Z_CAP(c) uint16_t *a, const uint16_t *b, size_t c),(a,b,c),return) ++#else + SDL_DYNAPI_PROC(size_t,SDL_wcslen,(const wchar_t *a),(a),return) + SDL_DYNAPI_PROC(size_t,SDL_wcslcpy,(SDL_OUT_Z_CAP(c) wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return) + SDL_DYNAPI_PROC(size_t,SDL_wcslcat,(SDL_INOUT_Z_CAP(c) wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return) ++#endif + SDL_DYNAPI_PROC(size_t,SDL_strlen,(const char *a),(a),return) + SDL_DYNAPI_PROC(size_t,SDL_strlcpy,(SDL_OUT_Z_CAP(c) char *a, const char *b, size_t c),(a,b,c),return) + SDL_DYNAPI_PROC(size_t,SDL_utf8strlcpy,(SDL_OUT_Z_CAP(c) char *a, const char *b, size_t c),(a,b,c),return) +@@ -660,7 +666,11 @@ + SDL_DYNAPI_PROC(SDL_JoystickID,SDL_JoystickGetDeviceInstanceID,(int a),(a),return) + SDL_DYNAPI_PROC(size_t,SDL_utf8strlen,(const char *a),(a),return) + SDL_DYNAPI_PROC(void*,SDL_LoadFile_RW,(SDL_RWops *a, size_t *b, int c),(a,b,c),return) ++#ifdef __midipix__ ++SDL_DYNAPI_PROC(int,SDL_wcscmp,(const uint16_t *a, const uint16_t *b),(a,b),return) ++#else + SDL_DYNAPI_PROC(int,SDL_wcscmp,(const wchar_t *a, const wchar_t *b),(a,b),return) ++#endif + SDL_DYNAPI_PROC(SDL_BlendMode,SDL_ComposeCustomBlendMode,(SDL_BlendFactor a, SDL_BlendFactor b, SDL_BlendOperation c, SDL_BlendFactor d, SDL_BlendFactor e, SDL_BlendOperation f),(a,b,c,d,e,f),return) + SDL_DYNAPI_PROC(SDL_Surface*,SDL_DuplicateSurface,(SDL_Surface *a),(a),return) + SDL_DYNAPI_PROC(int,SDL_Vulkan_LoadLibrary,(const char *a),(a),return) +@@ -719,7 +729,11 @@ + #endif + SDL_DYNAPI_PROC(double,SDL_exp,(double a),(a),return) + SDL_DYNAPI_PROC(float,SDL_expf,(float a),(a),return) ++#ifdef __midipix__ ++SDL_DYNAPI_PROC(uint16_t*,SDL_wcsdup,(const uint16_t *a),(a),return) ++#else + SDL_DYNAPI_PROC(wchar_t*,SDL_wcsdup,(const wchar_t *a),(a),return) ++#endif + SDL_DYNAPI_PROC(int,SDL_GameControllerRumble,(SDL_GameController *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return) + SDL_DYNAPI_PROC(int,SDL_JoystickRumble,(SDL_Joystick *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return) + SDL_DYNAPI_PROC(int,SDL_NumSensors,(void),(),return) +@@ -785,8 +799,13 @@ + SDL_DYNAPI_PROC(int,SDL_LockTextureToSurface,(SDL_Texture *a, const SDL_Rect *b, SDL_Surface **c),(a,b,c),return) + SDL_DYNAPI_PROC(SDL_bool,SDL_HasARMSIMD,(void),(),return) + SDL_DYNAPI_PROC(char*,SDL_strtokr,(char *a, const char *b, char **c),(a,b,c),return) ++#ifdef __midipix__ ++SDL_DYNAPI_PROC(uint16_t*,SDL_wcsstr,(const uint16_t *a, const uint16_t *b),(a,b),return) ++SDL_DYNAPI_PROC(int,SDL_wcsncmp,(const uint16_t *a, const uint16_t *b, size_t c),(a,b,c),return) ++#else + SDL_DYNAPI_PROC(wchar_t*,SDL_wcsstr,(const wchar_t *a, const wchar_t *b),(a,b),return) + SDL_DYNAPI_PROC(int,SDL_wcsncmp,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return) ++#endif + SDL_DYNAPI_PROC(SDL_GameControllerType,SDL_GameControllerTypeForIndex,(int a),(a),return) + SDL_DYNAPI_PROC(SDL_GameControllerType,SDL_GameControllerGetType,(SDL_GameController *a),(a),return) + SDL_DYNAPI_PROC(SDL_GameController*,SDL_GameControllerFromPlayerIndex,(int a),(a),return) diff --git a/patches/sdl2/iconv.patch b/patches/sdl2/iconv.patch index 64008c8a..3163ed38 100644 --- a/patches/sdl2/iconv.patch +++ b/patches/sdl2/iconv.patch @@ -1,12 +1,12 @@ -diff -ru SDL2-2.0.8.orig/src/stdlib/SDL_iconv.c SDL2-2.0.8/src/stdlib/SDL_iconv.c ---- SDL2-2.0.8.orig/src/stdlib/SDL_iconv.c 2018-03-01 17:34:42.000000000 +0100 -+++ SDL2-2.0.8/src/stdlib/SDL_iconv.c 2020-10-05 12:56:24.565427760 +0200 +diff -ru SDL2-2.0.12.orig/src/stdlib/SDL_iconv.c SDL2-2.0.12/src/stdlib/SDL_iconv.c +--- SDL2-2.0.12.orig/src/stdlib/SDL_iconv.c 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/stdlib/SDL_iconv.c 2020-10-07 12:52:35.217963940 +0200 @@ -37,7 +37,7 @@ iconv() may or may not use const char ** for the inbuf param. If we get this wrong, it's just a warning, so no big deal. */ --#if defined(_XGP6) || defined(__APPLE__) || \ -+#if defined(_XGP6) || defined(__APPLE__) || defined(__midipix__) || \ +-#if defined(_XGP6) || defined(__APPLE__) || defined(__RISCOS__) || \ ++#if defined(_XGP6) || defined(__APPLE__) || defined(__RISCOS__) || defined(__midipix__) || \ defined(__EMSCRIPTEN__) || \ (defined(__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) || \ (defined(_NEWLIB_VERSION))) diff --git a/patches/sdl2/u16.patch b/patches/sdl2/u16.patch index d282e5e7..0a8966b4 100644 --- a/patches/sdl2/u16.patch +++ b/patches/sdl2/u16.patch @@ -1,59 +1,23 @@ -diff -ru SDL2-2.0.8.orig/include/SDL_stdinc.h SDL2-2.0.8/include/SDL_stdinc.h ---- SDL2-2.0.8.orig/include/SDL_stdinc.h 2018-03-01 17:34:41.000000000 +0100 -+++ SDL2-2.0.8/include/SDL_stdinc.h 2020-10-05 12:29:51.927442178 +0200 -@@ -451,10 +451,17 @@ - extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); - extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); - -+#ifdef __midipix__ -+extern DECLSPEC size_t SDLCALL SDL_wcslen(const uint16_t *wstr); -+extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) uint16_t *dst, const uint16_t *src, size_t maxlen); -+extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) uint16_t *dst, const uint16_t *src, size_t maxlen); -+extern DECLSPEC int SDLCALL SDL_wcscmp(const uint16_t *str, const uint16_t *str2); -+#else - extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); - extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); - extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); - extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2); -+#endif /* !__midipix__ */ - - extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str); - extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen); -diff -ru SDL2-2.0.8.orig/src/dynapi/SDL_dynapi_procs.h SDL2-2.0.8/src/dynapi/SDL_dynapi_procs.h ---- SDL2-2.0.8.orig/src/dynapi/SDL_dynapi_procs.h 2018-03-01 17:34:42.000000000 +0100 -+++ SDL2-2.0.8/src/dynapi/SDL_dynapi_procs.h 2020-10-05 12:41:07.154180772 +0200 -@@ -418,9 +418,15 @@ - SDL_DYNAPI_PROC(void*,SDL_memcpy,(SDL_OUT_BYTECAP(c) void *a, SDL_IN_BYTECAP(c) const void *b, size_t c),(a,b,c),return) - SDL_DYNAPI_PROC(void*,SDL_memmove,(SDL_OUT_BYTECAP(c) void *a, SDL_IN_BYTECAP(c) const void *b, size_t c),(a,b,c),return) - SDL_DYNAPI_PROC(int,SDL_memcmp,(const void *a, const void *b, size_t c),(a,b,c),return) -+#ifdef __midipix__ -+SDL_DYNAPI_PROC(size_t,SDL_wcslen,(const uint16_t *a),(a),return) -+SDL_DYNAPI_PROC(size_t,SDL_wcslcpy,(SDL_OUT_Z_CAP(c) uint16_t *a, const uint16_t *b, size_t c),(a,b,c),return) -+SDL_DYNAPI_PROC(size_t,SDL_wcslcat,(SDL_INOUT_Z_CAP(c) uint16_t *a, const uint16_t *b, size_t c),(a,b,c),return) -+#else - SDL_DYNAPI_PROC(size_t,SDL_wcslen,(const wchar_t *a),(a),return) - SDL_DYNAPI_PROC(size_t,SDL_wcslcpy,(SDL_OUT_Z_CAP(c) wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return) - SDL_DYNAPI_PROC(size_t,SDL_wcslcat,(SDL_INOUT_Z_CAP(c) wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return) -+#endif - SDL_DYNAPI_PROC(size_t,SDL_strlen,(const char *a),(a),return) - SDL_DYNAPI_PROC(size_t,SDL_strlcpy,(SDL_OUT_Z_CAP(c) char *a, const char *b, size_t c),(a,b,c),return) - SDL_DYNAPI_PROC(size_t,SDL_utf8strlcpy,(SDL_OUT_Z_CAP(c) char *a, const char *b, size_t c),(a,b,c),return) -@@ -660,7 +666,11 @@ - SDL_DYNAPI_PROC(SDL_JoystickID,SDL_JoystickGetDeviceInstanceID,(int a),(a),return) - SDL_DYNAPI_PROC(size_t,SDL_utf8strlen,(const char *a),(a),return) - SDL_DYNAPI_PROC(void*,SDL_LoadFile_RW,(SDL_RWops *a, size_t *b, int c),(a,b,c),return) +diff -ru SDL2-2.0.8.orig/src/video/windows/SDL_windowsmessagebox.c SDL2-2.0.8/src/video/windows/SDL_windowsmessagebox.c +--- SDL2-2.0.8.orig/src/video/windows/SDL_windowsmessagebox.c 2018-03-01 17:34:42.000000000 +0100 ++++ SDL2-2.0.8/src/video/windows/SDL_windowsmessagebox.c 2020-10-05 12:51:31.389436939 +0200 +@@ -350,7 +350,11 @@ + HFONT DialogFont; + SIZE Size; + RECT TextSize; +#ifdef __midipix__ -+SDL_DYNAPI_PROC(int,SDL_wcscmp,(const uint16_t *a, const uint16_t *b),(a,b),return) ++ uint16_t *wmessage; +#else - SDL_DYNAPI_PROC(int,SDL_wcscmp,(const wchar_t *a, const wchar_t *b),(a,b),return) + wchar_t* wmessage; +#endif - SDL_DYNAPI_PROC(SDL_BlendMode,SDL_ComposeCustomBlendMode,(SDL_BlendFactor a, SDL_BlendFactor b, SDL_BlendOperation c, SDL_BlendFactor d, SDL_BlendFactor e, SDL_BlendOperation f),(a,b,c,d,e,f),return) - SDL_DYNAPI_PROC(SDL_Surface*,SDL_DuplicateSurface,(SDL_Surface *a),(a),return) - SDL_DYNAPI_PROC(int,SDL_Vulkan_LoadLibrary,(const char *a),(a),return) -diff -ru SDL2-2.0.8.orig/src/stdlib/SDL_string.c SDL2-2.0.8/src/stdlib/SDL_string.c ---- SDL2-2.0.8.orig/src/stdlib/SDL_string.c 2018-03-01 17:34:42.000000000 +0100 -+++ SDL2-2.0.8/src/stdlib/SDL_string.c 2020-10-05 12:29:39.691442561 +0200 -@@ -416,6 +416,44 @@ + TEXTMETRIC TM; + + HWND ParentWindow = NULL; + +diff -ru SDL2-2.0.12.orig/src/stdlib/SDL_string.c SDL2-2.0.12/src/stdlib/SDL_string.c +--- SDL2-2.0.12.orig/src/stdlib/SDL_string.c 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/stdlib/SDL_string.c 2020-10-07 13:40:28.237747292 +0200 +@@ -421,6 +421,63 @@ #endif /* HAVE_STRLEN */ } @@ -89,35 +53,39 @@ diff -ru SDL2-2.0.8.orig/src/stdlib/SDL_string.c SDL2-2.0.8/src/stdlib/SDL_strin + return dstlen + srclen; +} + ++uint16_t * ++SDL_wcsdup(const uint16_t *string) ++{ ++ return u16_wcsdup(string); ++} ++ ++uint16_t * ++SDL_wcsstr(const uint16_t *haystack, const uint16_t *needle) ++{ ++ return SDL_const_cast(uint16_t*,u16_wcsstr(haystack, needle)); ++} ++ +int +SDL_wcscmp(const uint16_t *str1, const uint16_t *str2) +{ + return u16_wcscmp(str1, str2); +} -+#else ++ ++int ++SDL_wcsncmp(const uint16_t *str1, const uint16_t *str2, size_t maxlen) ++{ ++ return u16_wcsncmp(str1, str2, maxlen); ++} ++ ++#else /* !__MIDIPIX__ */ size_t SDL_wcslen(const wchar_t * string) { -@@ -476,6 +514,7 @@ +@@ -525,6 +582,7 @@ return (int)(*str1 - *str2); - #endif /* HAVE_WCSCMP */ + #endif /* HAVE_WCSNCMP */ } -+#endif /* !__midipix__ */ ++#endif /* !__MIDIPIX__ */ size_t SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen) -diff -ru SDL2-2.0.8.orig/src/video/windows/SDL_windowsmessagebox.c SDL2-2.0.8/src/video/windows/SDL_windowsmessagebox.c ---- SDL2-2.0.8.orig/src/video/windows/SDL_windowsmessagebox.c 2018-03-01 17:34:42.000000000 +0100 -+++ SDL2-2.0.8/src/video/windows/SDL_windowsmessagebox.c 2020-10-05 12:51:31.389436939 +0200 -@@ -350,7 +350,11 @@ - HFONT DialogFont; - SIZE Size; - RECT TextSize; -+#ifdef __midipix__ -+ uint16_t *wmessage; -+#else - wchar_t* wmessage; -+#endif - TEXTMETRIC TM; - - HWND ParentWindow = NULL; diff --git a/patches/sdl2/wchar.patch b/patches/sdl2/wchar.patch index ea5a7dfb..8513c88e 100644 --- a/patches/sdl2/wchar.patch +++ b/patches/sdl2/wchar.patch @@ -1,26 +1,24 @@ -diff -ru SDL2-2.0.8.orig/src/video/windows/SDL_windowsevents.c SDL2-2.0.8/src/video/windows/SDL_windowsevents.c ---- SDL2-2.0.8.orig/src/video/windows/SDL_windowsevents.c 2018-03-01 17:34:42.000000000 +0100 -+++ SDL2-2.0.8/src/video/windows/SDL_windowsevents.c 2020-10-05 13:11:43.595494306 +0200 -@@ -47,6 +47,10 @@ - #include "wmmsg.h" - #endif - -+#ifdef __midipix__ -+#define sdl_window_data (uint16_t[]){'S','D','L','_','W','i','n','d','o','w','D','a','t','a',0} -+#endif -+ - /* For processing mouse WM_*BUTTON* and WM_MOUSEMOVE message-data from GetMessageExtraInfo() */ - #define MOUSEEVENTF_FROMTOUCH 0xFF515700 - -@@ -384,7 +388,11 @@ +diff -ru SDL2-2.0.12.orig/src/video/windows/SDL_windowsmessagebox.c SDL2-2.0.12/src/video/windows/SDL_windowsmessagebox.c +--- SDL2-2.0.12.orig/src/video/windows/SDL_windowsmessagebox.c 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/video/windows/SDL_windowsmessagebox.c 2020-10-07 14:04:09.877146877 +0200 +@@ -803,7 +803,7 @@ } - + + /* If we cannot load comctl32.dll use the old messagebox! */ +- hComctl32 = LoadLibrary(TEXT("Comctl32.dll")); ++ hComctl32 = LoadLibrary((uint16_t[]){'C','o','m','c','t','l','3','2','.','d','l','l',0}); + if (hComctl32 == NULL) { + return WIN_ShowOldMessageBox(messageboxdata, buttonid); + } +diff -ru SDL2-2.0.12.orig/src/video/windows/SDL_windowsevents.c SDL2-2.0.12/src/video/windows/SDL_windowsevents.c +--- SDL2-2.0.12.orig/src/video/windows/SDL_windowsevents.c 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/video/windows/SDL_windowsevents.c 2020-10-07 14:00:09.021392356 +0200 +@@ -416,7 +416,7 @@ + } + /* Get the window data for the window */ -+#ifdef __midipix__ -+ data = (SDL_WindowData *) GetProp(hwnd, sdl_window_data); -+#else - data = (SDL_WindowData *) GetProp(hwnd, TEXT("SDL_WindowData")); -+#endif +- data = (SDL_WindowData *) GetProp(hwnd, TEXT("SDL_WindowData")); ++ data = (SDL_WindowData *) GetProp(hwnd, (uint16_t[]){'S','D','L','_','W','i','n','d','o','w','D','a','t','a',0}); if (!data) { return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam); } diff --git a/patches/sdl2/win32.patch b/patches/sdl2/win32.patch index 0cc8167a..fc99beb4 100644 --- a/patches/sdl2/win32.patch +++ b/patches/sdl2/win32.patch @@ -1,3 +1,18 @@ +diff -ru SDL2-2.0.12.orig/src/video/windows/SDL_windowsvideo.c SDL2-2.0.12/src/video/windows/SDL_windowsvideo.c +--- SDL2-2.0.12.orig/src/video/windows/SDL_windowsvideo.c 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/video/windows/SDL_windowsvideo.c 2020-10-07 13:49:51.592298088 +0200 +@@ -43,6 +43,10 @@ + SDL_bool g_WindowsEnableMessageLoop = SDL_TRUE; + SDL_bool g_WindowFrameUsableWhileCursorHidden = SDL_TRUE; + ++#ifndef ES_CONTINUOUS ++#define ES_CONTINUOUS ((DWORD)0x80000000) ++#endif ++ + static void SDLCALL + UpdateWindowsEnableMessageLoop(void *userdata, const char *name, const char *oldValue, const char *newValue) + { + --- SDL2-2.0.8.orig/src/video/windows/SDL_windowsvideo.c 2018-03-01 17:34:42.000000000 +0100 +++ SDL2-2.0.8/src/video/windows/SDL_windowsvideo.c 2020-10-05 01:07:51.101894646 +0200 @@ -240,13 +240,17 @@ -- cgit v1.2.3