Use GetMainWindowHandle() provided by main_windows.cpp

This commit is contained in:
gbeauche 2006-03-28 06:59:30 +00:00
parent 8d73299187
commit dfbb829055
2 changed files with 4 additions and 14 deletions

View File

@ -93,16 +93,8 @@ struct ByteArray : public vector<uint8> {
static void do_putscrap(uint32 type, void *scrap, int32 length);
static void do_getscrap(void **handle, uint32 type, int32 offset);
// The main window handle
#ifdef USE_SDL_VIDEO
#include <SDL_syswm.h>
static HWND GetMainWindowHandle(void)
{
SDL_SysWMinfo wmInfo;
SDL_VERSION(&wmInfo.version);
return SDL_GetWMInfo(&wmInfo) ? wmInfo.window : NULL;
}
#endif
// From main_windows.cpp
extern HWND GetMainWindowHandle(void);
/*

View File

@ -650,12 +650,10 @@ static int tick_func(void *arg)
#ifdef USE_SDL_VIDEO
#include <SDL_syswm.h>
static HWND GetMainWindowHandle(void)
HWND GetMainWindowHandle(void)
{
SDL_SysWMinfo wmInfo;
wmInfo.version.major = SDL_MAJOR_VERSION;
wmInfo.version.minor = SDL_MINOR_VERSION;
wmInfo.version.patch = SDL_PATCHLEVEL;
SDL_VERSION(&wmInfo.version);
return SDL_GetWMInfo(&wmInfo) ? wmInfo.window : NULL;
}
#endif