Merge branch 'master' into GLSL-master

Conflicts:
	CMakeLists.txt
	Source/Core/DolphinWX/Dolphin.vcxproj
	Source/Core/DolphinWX/Src/GLInterface/WX.cpp
	Source/Core/DolphinWX/Src/GLInterface/WX.h
	Source/Core/VideoCommon/Src/TextureCacheBase.cpp
	Source/Core/VideoCommon/Src/TextureCacheBase.h
	Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h
	Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h
	Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp

damn mipmap_fixes ...
This commit is contained in:
degasus
2013-02-18 18:49:20 +01:00
184 changed files with 7637 additions and 6605 deletions

View File

@ -483,8 +483,7 @@ void FifoPlayerDlg::OnBeginSearch(wxCommandEvent& event)
SearchResult result;
result.frame_idx = frame_idx;
int obj_idx = m_objectsList->GetSelection();
result.obj_idx = obj_idx;
result.obj_idx = m_objectsList->GetSelection();
result.cmd_idx = 0;
for (unsigned int cmd_idx = 1; cmd_idx < m_objectCmdOffsets.size(); ++cmd_idx)
{
@ -625,7 +624,9 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
int stream_size = Common::swap16(objectdata);
objectdata += 2;
wxString newLabel = wxString::Format(wxT("%08X: %02X %04X "), obj_offset, cmd, stream_size);
if ((objectdata_end - objectdata) % stream_size) newLabel += _("NOTE: Stream size doesn't match actual data length\n");
if (stream_size && ((objectdata_end - objectdata) % stream_size))
newLabel += _("NOTE: Stream size doesn't match actual data length\n");
while (objectdata < objectdata_end)
{
newLabel += wxString::Format(wxT("%02X"), *objectdata++);
@ -642,8 +643,8 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
{
m_objectCmdOffsets.push_back(objectdata - objectdata_start);
int new_offset = objectdata - &fifo_frame.fifoData[frame.objectStarts[0]];
int cmd = *objectdata++;
switch (cmd)
int command = *objectdata++;
switch (command)
{
case GX_NOP:
newLabel = _("NOP");
@ -691,9 +692,9 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
case GX_LOAD_INDX_C:
case GX_LOAD_INDX_D:
objectdata += 4;
newLabel = wxString::Format(wxT("LOAD INDX %s"), (cmd == GX_LOAD_INDX_A) ? _("A") :
(cmd == GX_LOAD_INDX_B) ? _("B") :
(cmd == GX_LOAD_INDX_C) ? _("C") : _("D"));
newLabel = wxString::Format(wxT("LOAD INDX %s"), (command == GX_LOAD_INDX_A) ? _("A") :
(command == GX_LOAD_INDX_B) ? _("B") :
(command == GX_LOAD_INDX_C) ? _("C") : _("D"));
break;
case GX_CMD_CALL_DL:

View File

@ -1566,6 +1566,8 @@ void CFrame::UpdateGUI()
if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, true);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(true);
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
}
// Prepare to load last selected file, enable play button
else if (!SConfig::GetInstance().m_LastFilename.empty()
@ -1574,6 +1576,8 @@ void CFrame::UpdateGUI()
if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, true);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(true);
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
}
else
{
@ -1581,6 +1585,8 @@ void CFrame::UpdateGUI()
if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, false);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(false);
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(false);
}
}
@ -1596,6 +1602,8 @@ void CFrame::UpdateGUI()
if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, true);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(true);
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
}
}
else if (Initialized)

View File

@ -26,6 +26,12 @@ void cInterfaceEGL::UpdateFPSDisplay(const char *text)
{
XStoreName(GLWin.dpy, GLWin.win, text);
}
void cInterfaceEGL::SwapInterval(int Interval)
{
eglSwapInterval(GLWin.egl_dpy, Interval);
}
void cInterfaceEGL::Swap()
{
eglSwapBuffers(GLWin.egl_dpy, GLWin.egl_surf);
@ -42,38 +48,30 @@ bool cInterfaceEGL::Create(void *&window_handle)
s_backbuffer_width = _twidth;
s_backbuffer_height = _theight;
const char *s;
EGLint egl_major, egl_minor;
EGLint egl_major, egl_minor;
GLWin.dpy = XOpenDisplay(NULL);
GLWin.dpy = XOpenDisplay(NULL);
if (!GLWin.dpy) {
printf("Error: couldn't open display\n");
return false;
}
if (!GLWin.dpy) {
ERROR_LOG(VIDEO, "Error: couldn't open display\n");
return false;
}
GLWin.egl_dpy = eglGetDisplay(GLWin.dpy);
if (!GLWin.egl_dpy) {
printf("Error: eglGetDisplay() failed\n");
return false;
}
GLWin.egl_dpy = eglGetDisplay(GLWin.dpy);
if (!GLWin.egl_dpy) {
ERROR_LOG(VIDEO, "Error: eglGetDisplay() failed\n");
return false;
}
if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor)) {
printf("Error: eglInitialize() failed\n");
return false;
}
if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor)) {
ERROR_LOG(VIDEO, "Error: eglInitialize() failed\n");
return false;
}
s = eglQueryString(GLWin.egl_dpy, EGL_VERSION);
printf("EGL_VERSION = %s\n", s);
s = eglQueryString(GLWin.egl_dpy, EGL_VENDOR);
printf("EGL_VENDOR = %s\n", s);
s = eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS);
printf("EGL_EXTENSIONS = %s\n", s);
s = eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS);
printf("EGL_CLIENT_APIS = %s\n", s);
INFO_LOG(VIDEO, "EGL_VERSION = %s\n", eglQueryString(GLWin.egl_dpy, EGL_VERSION));
INFO_LOG(VIDEO, "EGL_VENDOR = %s\n", eglQueryString(GLWin.egl_dpy, EGL_VENDOR));
INFO_LOG(VIDEO, "EGL_EXTENSIONS = %s\n", eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS));
INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS));
// attributes for a visual in RGBA format with at least
// 8 bits per color and a 24 bit depth buffer
@ -102,29 +100,29 @@ bool cInterfaceEGL::Create(void *&window_handle)
if (GLWin.parent == 0)
GLWin.parent = RootWindow(GLWin.dpy, GLWin.screen);
XVisualInfo visTemplate;
int num_visuals;
EGLConfig config;
EGLint num_configs;
EGLint vid;
XVisualInfo visTemplate;
int num_visuals;
EGLConfig config;
EGLint num_configs;
EGLint vid;
if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs)) {
printf("Error: couldn't get an EGL visual config\n");
exit(1);
}
if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs)) {
ERROR_LOG(VIDEO, "Error: couldn't get an EGL visual config\n");
return false;
}
if (!eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {
printf("Error: eglGetConfigAttrib() failed\n");
exit(1);
}
if (!eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {
ERROR_LOG(VIDEO, "Error: eglGetConfigAttrib() failed\n");
return false;
}
/* The X window visual must match the EGL config */
visTemplate.visualid = vid;
GLWin.vi = XGetVisualInfo(GLWin.dpy, VisualIDMask, &visTemplate, &num_visuals);
if (!GLWin.vi) {
printf("Error: couldn't get X visual\n");
exit(1);
}
/* The X window visual must match the EGL config */
visTemplate.visualid = vid;
GLWin.vi = XGetVisualInfo(GLWin.dpy, VisualIDMask, &visTemplate, &num_visuals);
if (!GLWin.vi) {
ERROR_LOG(VIDEO, "Error: couldn't get X visual\n");
return false;
}
GLWin.x = _tx;
GLWin.y = _ty;
@ -138,33 +136,26 @@ bool cInterfaceEGL::Create(void *&window_handle)
eglBindAPI(EGL_OPENGL_API);
#endif
GLWin.egl_ctx = eglCreateContext(GLWin.egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs );
if (!GLWin.egl_ctx) {
printf("Error: eglCreateContext failed\n");
exit(1);
}
if (!GLWin.egl_ctx) {
ERROR_LOG(VIDEO, "Error: eglCreateContext failed\n");
return false;
}
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.win, NULL);
if (!GLWin.egl_surf) {
printf("Error: eglCreateWindowSurface failed\n");
exit(1);
}
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.win, NULL);
if (!GLWin.egl_surf) {
ERROR_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n");
return false;
}
if (!eglMakeCurrent(GLWin.egl_dpy, GLWin.egl_surf, GLWin.egl_surf, GLWin.egl_ctx)) {
printf("Error: eglMakeCurrent() failed\n");
return false;
}
if (!eglMakeCurrent(GLWin.egl_dpy, GLWin.egl_surf, GLWin.egl_surf, GLWin.egl_ctx)) {
ERROR_LOG(VIDEO, "Error: eglMakeCurrent() failed\n");
return false;
}
printf("GL_VENDOR: %s\n", glGetString(GL_VENDOR));
printf("GL_RENDERER: %s\n", glGetString(GL_RENDERER));
printf("GL_VERSION: %s\n", glGetString(GL_VERSION));
printf("GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS));
/* Set initial projection/viewing transformation.
* We can't be sure we'll get a ConfigureNotify event when the window
* first appears.
*/
glViewport(0, 0, (GLint) _twidth, (GLint) _theight);
INFO_LOG(VIDEO, "GL_VENDOR: %s\n", glGetString(GL_VENDOR));
INFO_LOG(VIDEO, "GL_RENDERER: %s\n", glGetString(GL_RENDERER));
INFO_LOG(VIDEO, "GL_VERSION: %s\n", glGetString(GL_VERSION));
INFO_LOG(VIDEO, "GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS));
window_handle = (void *)GLWin.win;
return true;
}

View File

@ -34,6 +34,7 @@ private:
cX11Window XWindow;
public:
friend class cX11Window;
void SwapInterval(int Interval);
void Swap();
void UpdateFPSDisplay(const char *Text);
bool Create(void *&window_handle);

View File

@ -27,6 +27,15 @@ void cInterfaceGLX::UpdateFPSDisplay(const char *text)
{
XStoreName(GLWin.dpy, GLWin.win, text);
}
void cInterfaceGLX::SwapInterval(int Interval)
{
if (glXSwapIntervalSGI)
glXSwapIntervalSGI(Interval);
else
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
}
void cInterfaceGLX::Swap()
{
glXSwapBuffers(GLWin.dpy, GLWin.win);

View File

@ -31,6 +31,7 @@ private:
cX11Window XWindow;
public:
friend class cX11Window;
void SwapInterval(int Interval);
void Swap();
void UpdateFPSDisplay(const char *Text);
bool Create(void *&window_handle);

View File

@ -29,6 +29,7 @@ public:
virtual bool MakeCurrent() = 0;
virtual void Shutdown() = 0;
virtual void SwapInterval(int Interval) { }
virtual u32 GetBackBufferWidth() { return s_backbuffer_width; }
virtual u32 GetBackBufferHeight() { return s_backbuffer_height; }
virtual void SetBackBufferDimensions(u32 W, u32 H) {s_backbuffer_width = W; s_backbuffer_height = H; }

View File

@ -27,6 +27,13 @@
static HDC hDC = NULL; // Private GDI Device Context
static HGLRC hRC = NULL; // Permanent Rendering Context
void cInterfaceWGL::SwapInterval(int Interval)
{
if (WGLEW_EXT_swap_control)
wglSwapIntervalEXT(Interval);
else
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
}
void cInterfaceWGL::Swap()
{
SwapBuffers(hDC);

View File

@ -28,6 +28,7 @@
class cInterfaceWGL : public cInterfaceBase
{
public:
void SwapInterval(int Interval);
void Swap();
void UpdateFPSDisplay(const char *Text);
bool Create(void *&window_handle);

View File

@ -57,6 +57,8 @@ size_t CGameListCtrl::m_numberItem = 0;
std::string CGameListCtrl::m_currentFilename;
bool sorted = false;
extern CFrame* main_frame;
static int CompareGameListItems(const GameListItem* iso1, const GameListItem* iso2,
long sortData = CGameListCtrl::COLUMN_TITLE)
{
@ -94,6 +96,13 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
switch(sortData)
{
case CGameListCtrl::COLUMN_TITLE:
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
{
if (iso1->IsDiscTwo())
return 1 * t;
else if (iso2->IsDiscTwo())
return -1 * t;
}
return strcasecmp(iso1->GetName(indexOne).c_str(),
iso2->GetName(indexOther).c_str()) * t;
case CGameListCtrl::COLUMN_NOTES:
@ -366,7 +375,8 @@ void CGameListCtrl::Update()
SetItemFont(index, *wxITALIC_FONT);
SetColumnWidth(0, wxLIST_AUTOSIZE);
}
if (GetSelectedISO() == NULL)
main_frame->UpdateGUI();
Show();
AutomaticColumnWidth();
@ -968,7 +978,7 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
{
long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (item == wxNOT_FOUND)
return new GameListItem(""); // TODO: wtf is this
return NULL;
else
{
// Here is a little workaround for multiselections:

View File

@ -36,7 +36,7 @@
#include "ChunkFile.h"
#include "../resources/no_banner.cpp"
#define CACHE_REVISION 0x10E
#define CACHE_REVISION 0x10F
#define DVD_BANNER_WIDTH 96
#define DVD_BANNER_HEIGHT 32
@ -91,6 +91,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
m_UniqueID = pVolume->GetUniqueID();
m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str());
m_IsDiscTwo = pVolume->IsDiscTwo();
// check if we can get some infos from the banner file too
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume);
@ -235,6 +236,7 @@ void GameListItem::DoState(PointerWrap &p)
p.Do(m_BlobCompressed);
p.Do(m_pImage);
p.Do(m_Platform);
p.Do(m_IsDiscTwo);
}
std::string GameListItem::CreateCacheFilename()

View File

@ -48,6 +48,7 @@ public:
bool IsCompressed() const {return m_BlobCompressed;}
u64 GetFileSize() const {return m_FileSize;}
u64 GetVolumeSize() const {return m_VolumeSize;}
bool IsDiscTwo() const {return m_IsDiscTwo;}
#if defined(HAVE_WX) && HAVE_WX
const wxImage& GetImage() const {return m_Image;}
#endif
@ -87,6 +88,7 @@ private:
bool m_BlobCompressed;
std::vector<u8> m_pImage;
u32 m_ImageSize;
bool m_IsDiscTwo;
bool LoadFromCache();
void SaveToCache();

View File

@ -328,8 +328,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
// Wii Console
EnableWideScreen = new wxCheckBox(m_GameConfig, ID_ENABLEWIDESCREEN, _("Enable WideScreen"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
DisableWiimoteSpeaker = new wxCheckBox(m_GameConfig, ID_DISABLEWIIMOTESPEAKER, _("Alternate Wiimote Timing"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
DisableWiimoteSpeaker->SetToolTip(_("Mutes the Wiimote speaker. Fixes random disconnections on real wiimotes. No effect on emulated wiimotes."));
// Video
UseBBox = new wxCheckBox(m_GameConfig, ID_USE_BBOX, _("Enable Bounding Box Calculation"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER);
@ -377,10 +375,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
{
sbWiiOverrides->ShowItems(false);
EnableWideScreen->Hide();
DisableWiimoteSpeaker->Hide();
}
sbWiiOverrides->Add(EnableWideScreen, 0, wxLEFT, 5);
sbWiiOverrides->Add(DisableWiimoteSpeaker, 0, wxLEFT, 5);
wxStaticBoxSizer * const sbVideoOverrides =
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Video"));
@ -966,11 +962,6 @@ void CISOProperties::LoadGameConfig()
else
EnableWideScreen->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Wii", "DisableWiimoteSpeaker", &bTemp))
DisableWiimoteSpeaker->Set3StateValue((wxCheckBoxState)bTemp);
else
DisableWiimoteSpeaker->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Video", "UseBBox", &bTemp))
UseBBox->Set3StateValue((wxCheckBoxState)bTemp);
else
@ -999,7 +990,6 @@ void CISOProperties::LoadGameConfig()
if (!sTemp.empty())
{
EmuIssues->SetValue(wxString(sTemp.c_str(), *wxConvCurrent));
bRefreshList = true;
}
EmuIssues->Enable(EmuState->GetSelection() != 0);
@ -1060,11 +1050,6 @@ bool CISOProperties::SaveGameConfig()
else
GameIni.Set("Wii", "Widescreen", EnableWideScreen->Get3StateValue());
if (DisableWiimoteSpeaker->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Wii", "DisableWiimoteSpeaker");
else
GameIni.Set("Wii", "DisableWiimoteSpeaker", DisableWiimoteSpeaker->Get3StateValue());
if (UseBBox->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Video", "UseBBox");
else
@ -1085,6 +1070,11 @@ bool CISOProperties::SaveGameConfig()
GameIni.Set("Video", "PH_ZFar", PHack_Data.PHZFar);
GameIni.Set("EmuState", "EmulationStateId", EmuState->GetSelection());
std::string sTemp;
GameIni.Get("EmuState","EmulationIssues", &sTemp);
if (EmuIssues->GetValue() != sTemp)
bRefreshList = true;
GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(*wxConvCurrent));
PatchList_Save();

View File

@ -72,7 +72,7 @@ private:
wxCheckBox *CPUThread, *SkipIdle, *MMU, *DCBZOFF, *TLBHack;
wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE;
// Wii
wxCheckBox *EnableWideScreen, *DisableWiimoteSpeaker;
wxCheckBox *EnableWideScreen;
// Video
wxCheckBox *UseZTPSpeedupHack, *PHackEnable, *UseBBox;
wxButton *PHSettings;
@ -139,7 +139,6 @@ private:
ID_PHSETTINGS,
ID_ENABLEPROGRESSIVESCAN,
ID_ENABLEWIDESCREEN,
ID_DISABLEWIIMOTESPEAKER,
ID_EDITCONFIG,
ID_EMUSTATE,
ID_EMU_ISSUES,

View File

@ -519,7 +519,7 @@ wxStaticBoxSizer* ControlDialog::CreateControlChooser(GamepadPage* const parent)
button_sizer->Add(add_button, 1, 0, 5);
}
range_slider = new wxSlider(this, -1, SLIDER_TICK_COUNT, 0, SLIDER_TICK_COUNT * 5, wxDefaultPosition, wxDefaultSize, wxSL_TOP | wxSL_LABELS /*| wxSL_AUTOTICKS*/);
range_slider = new wxSlider(this, -1, SLIDER_TICK_COUNT, -SLIDER_TICK_COUNT * 5, SLIDER_TICK_COUNT * 5, wxDefaultPosition, wxDefaultSize, wxSL_TOP | wxSL_LABELS /*| wxSL_AUTOTICKS*/);
range_slider->SetValue((int)(control_reference->range * SLIDER_TICK_COUNT));

View File

@ -1099,8 +1099,8 @@ wxBitmap TASInputDlg::CreateStickBitmap(int x, int y)
y = y/2;
wxMemoryDC memDC;
wxBitmap bitmap(127, 127);
memDC.SelectObject(bitmap);
wxBitmap stick_bitmap(127, 127);
memDC.SelectObject(stick_bitmap);
memDC.SetBackground(*wxLIGHT_GREY_BRUSH);
memDC.Clear();
memDC.SetBrush(*wxWHITE_BRUSH);
@ -1116,5 +1116,5 @@ wxBitmap TASInputDlg::CreateStickBitmap(int x, int y)
memDC.SetBrush(*wxBLUE_BRUSH);
memDC.DrawCircle(x,y,5);
memDC.SelectObject(wxNullBitmap);
return bitmap;
return stick_bitmap;
}

View File

@ -124,12 +124,12 @@ void EWMH_Fullscreen(Display *dpy, int action)
#if defined(HAVE_WX) && HAVE_WX
Window XWindowFromHandle(void *Handle)
{
return GDK_WINDOW_XID(GTK_WIDGET(Handle)->window);
return GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(Handle)));
}
Display *XDisplayFromHandle(void *Handle)
{
return GDK_WINDOW_XDISPLAY(GTK_WIDGET(Handle)->window);
return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(GTK_WIDGET(Handle)));
}
#endif