From 6b930a9cffd01685811abbd03413d60a62298564 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Sun, 20 Dec 2009 21:36:44 +0000 Subject: [PATCH] Fix Linux up again. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2372 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/AppInit.cpp | 4 +++- pcsx2/gui/ConsoleLogger.cpp | 2 +- pcsx2/gui/MSWstuff.cpp | 6 ++++-- pcsx2/gui/MSWstuff.h | 6 ++++++ pcsx2/gui/MainFrame.cpp | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pcsx2/gui/AppInit.cpp b/pcsx2/gui/AppInit.cpp index abf9949577..67cede5dfe 100644 --- a/pcsx2/gui/AppInit.cpp +++ b/pcsx2/gui/AppInit.cpp @@ -482,7 +482,9 @@ void Pcsx2App::CleanupMess() Console.Indent().Error( ex.FormatDiagnosticMessage() ); } +#ifdef __WXMSW__ pxDwm_Unload(); +#endif // Notice: deleting the plugin manager (unloading plugins) here causes Lilypad to crash, // likely due to some pending message in the queue that references lilypad procs. @@ -558,4 +560,4 @@ struct CrtDebugBreak //CrtDebugBreak breakAt( 1175 ); -#endif \ No newline at end of file +#endif diff --git a/pcsx2/gui/ConsoleLogger.cpp b/pcsx2/gui/ConsoleLogger.cpp index 15383cb743..3ba6efca92 100644 --- a/pcsx2/gui/ConsoleLogger.cpp +++ b/pcsx2/gui/ConsoleLogger.cpp @@ -476,7 +476,7 @@ void ConsoleLogFrame::OnActivate( wxActivateEvent& evt ) // with it. (wxWidgets appears to have no equivalent to this) if( MainEmuFrame* mainframe = GetMainFramePtr() ) - MSW_SetWindowAfter( mainframe->GetHWND(), GetHWND() ); + MSW_SetWindowAfter( mainframe->GetHandle(), GetHandle() ); evt.Skip(); } diff --git a/pcsx2/gui/MSWstuff.cpp b/pcsx2/gui/MSWstuff.cpp index 7ea33699c8..e30787a827 100644 --- a/pcsx2/gui/MSWstuff.cpp +++ b/pcsx2/gui/MSWstuff.cpp @@ -21,12 +21,14 @@ # include // needed for OutputDebugString #endif +#ifdef __WXMSW__ void MSW_SetWindowAfter( WXHWND hwnd, WXHWND hwndAfter ) { -#ifndef __WXMSW__ SetWindowPos( (HWND)hwnd, (HWND)hwndAfter, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE ); -#endif } +#else +void MSW_SetWindowAfter( GtkWidget *widget, GtkWidget *widgetAfter ){} +#endif // Writes text to the Visual Studio Output window (Microsoft Windows only). // On all other platforms this pipes to StdErr instead. diff --git a/pcsx2/gui/MSWstuff.h b/pcsx2/gui/MSWstuff.h index c0762016f1..25732b09dc 100644 --- a/pcsx2/gui/MSWstuff.h +++ b/pcsx2/gui/MSWstuff.h @@ -15,9 +15,15 @@ #pragma once +#ifdef __WXMSW__ extern void MSW_SetWindowAfter( WXWidget hwnd, WXWidget hwndAfter ); +#else +extern void MSW_SetWindowAfter( GtkWidget *widget, GtkWidget *widgetAfter ); +#endif + extern void MSW_OutputDebugString( const wxString& text ); extern void pxDwm_Load(); extern void pxDwm_Unload(); extern void pxDwm_SetPresentParams( WXWidget wnd ); + diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index 2e353b9c78..c41899d3cc 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -456,7 +456,7 @@ void MainEmuFrame::OnActivate( wxActivateEvent& evt ) // window. When one is clicked, the other is assured to be brought to the foreground // with it. (wxWidgets appears to have no equivalent to this) if( ConsoleLogFrame* logframe = wxGetApp().GetProgramLog() ) - MSW_SetWindowAfter( logframe->GetHWND(), GetHWND() ); + MSW_SetWindowAfter( logframe->GetHandle(), GetHandle() ); evt.Skip(); }