mirror of https://github.com/PCSX2/pcsx2.git
PADNull: Fix a bug that caused it to crash if a GS plugin using GSOpen2 was chosen under Linux.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4559 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
378a92b4c6
commit
4bb717bab2
|
@ -15,7 +15,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
#include <gdk/gdkx.h>
|
||||||
#include "PadLinux.h"
|
#include "PadLinux.h"
|
||||||
|
|
||||||
Display *GSdsp;
|
Display *GSdsp;
|
||||||
|
@ -63,7 +63,24 @@ void _PadUpdate(int pad)
|
||||||
|
|
||||||
s32 _PADOpen(void *pDsp)
|
s32 _PADOpen(void *pDsp)
|
||||||
{
|
{
|
||||||
GSdsp = *(Display**)pDsp;
|
|
||||||
|
GtkScrolledWindow *win;
|
||||||
|
|
||||||
|
win = *(GtkScrolledWindow**) pDsp;
|
||||||
|
|
||||||
|
if (GTK_IS_WIDGET(win))
|
||||||
|
{
|
||||||
|
// Since we have a GtkScrolledWindow, for now we'll grab whatever display
|
||||||
|
// comes along instead. Later, we can fiddle with this, but I'm not sure the
|
||||||
|
// best way to get a Display* out of a GtkScrolledWindow. A GtkWindow I might
|
||||||
|
// be able to manage... --arcum42
|
||||||
|
GSdsp = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GSdsp = *(Display**)pDsp;
|
||||||
|
}
|
||||||
|
|
||||||
XAutoRepeatOff(GSdsp);
|
XAutoRepeatOff(GSdsp);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue