fix for HX build

This commit is contained in:
Wengier
2021-06-22 15:41:37 -04:00
parent 802751a0de
commit 363f4907a5
8 changed files with 16 additions and 1 deletions

View File

@@ -105,7 +105,9 @@
#if defined(WIN32) || defined(_WIN32)
#undef __WIN32__
#define __WIN32__ 1
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#define ENABLE_IM_EVENT 1
#endif
#endif
#endif /* _SDL_platform_h */

View File

@@ -159,6 +159,7 @@ typedef struct SDL_SysWMinfo {
HGLRC hglrc; /**< The OpenGL context, if any */
} SDL_SysWMinfo;
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
/* The windows custom input method information structure */
typedef struct SDL_SysIMinfo {
SDL_version version;
@@ -171,6 +172,7 @@ typedef struct SDL_SysIMinfo {
} win;
} info;
} SDL_SysIMinfo;
#endif
#elif defined(SDL_VIDEO_DRIVER_RISCOS)

View File

@@ -88,6 +88,7 @@ extern HINSTANCE SDL_Instance;
extern HWND SDL_Window;
extern BOOL SDL_windowid;
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
typedef struct {
HIMC SDL_IMC;
union {
@@ -107,6 +108,7 @@ typedef struct {
} _IM_Context;
extern _IM_Context IM_Context;
#endif
/* Variables and functions exported to other parts of the native video
subsystem (SDL_sysevents.c)

View File

@@ -96,7 +96,9 @@ DEVMODE SDL_fullscreen_mode;
#endif
WORD *gamma_saved = NULL;
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
_IM_Context IM_Context; /* patched */
#endif
/* Functions called by the message processing function */
LONG (*HandleMessage)(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)=NULL;

View File

@@ -305,6 +305,7 @@ int WIN_GetWMInfo(_THIS, SDL_SysWMinfo *info)
}
}
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
int WIN_GetIMInfo(_THIS, SDL_SysIMinfo *info)
{
if ( info->version.major <= SDL_MAJOR_VERSION ) {
@@ -331,3 +332,4 @@ int WIN_GetIMInfo(_THIS, SDL_SysIMinfo *info)
return(-1);
}
}
#endif

View File

@@ -32,6 +32,7 @@ extern void WIN_SetWMCaption(_THIS, const char *title, const char *icon);
extern int WIN_IconifyWindow(_THIS);
extern SDL_GrabMode WIN_GrabInput(_THIS, SDL_GrabMode mode);
extern int WIN_GetWMInfo(_THIS, SDL_SysWMinfo *info);
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
/* Functions to IM */
extern int WIN_GetIMInfo(_THIS, SDL_SysIMinfo *info);
#endif

View File

@@ -237,7 +237,9 @@ static SDL_VideoDevice *DIB_CreateDevice(int devindex)
device->SetIMValues = DIB_SetIMValues;
device->GetIMValues = DIB_GetIMValues;
device->FlushIMString = DIB_FlushIMString;
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
device->GetIMInfo = WIN_GetIMInfo;
#endif
device->free = DIB_DeleteDevice;
/* We're finally ready */

View File

@@ -722,7 +722,9 @@ static SDL_VideoDevice *DX5_CreateDevice(int devindex)
device->SetIMValues = DX5_SetIMValues;
device->GetIMValues = DX5_GetIMValues;
device->FlushIMString = DX5_FlushIMString;
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
device->GetIMInfo = WIN_GetIMInfo;
#endif
device->free = DX5_DeleteDevice;
/* We're finally ready */