add GFX2_Get_Window_Handle() to get the win32 HWND

and use it
This commit is contained in:
Thomas Bernard
2018-06-25 10:23:19 +02:00
parent b6dec6d3f7
commit cb2d479867
7 changed files with 44 additions and 76 deletions

View File

@@ -47,9 +47,6 @@
#ifdef WIN32
#include <windows.h>
#if defined(USE_SDL)
#include <SDL_syswm.h>
#endif
#elif defined __HAIKU__
#include "haiku.h"
@@ -307,18 +304,7 @@ static char* getClipboard(word * * unicode)
{
#ifdef WIN32
char* dst = NULL;
#if defined(USE_SDL) || defined(USE_SDL2)
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if ( SDL_GetWMInfo(&info) )
{
if (OpenClipboard(info.window) )
#else
{
if (OpenClipboard(GetActiveWindow()))
#endif
if (OpenClipboard(GFX2_Get_Window_Handle()))
{
HANDLE hMem;
if ( IsClipboardFormatAvailable(CF_TEXT) )
@@ -346,7 +332,6 @@ static char* getClipboard(word * * unicode)
}
CloseClipboard();
}
}
return dst;
#elif defined(__AROS__)