mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-23 12:10:08 +01:00
The Joystick class is available on Mac now,
but we need to check if one is present.
This commit is contained in:
@@ -17,9 +17,6 @@ import math
|
||||
import wx
|
||||
import wx.adv
|
||||
|
||||
haveJoystick = True
|
||||
if wx.Platform == "__WXMAC__":
|
||||
haveJoystick = False
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -950,12 +947,12 @@ class JoystickDemoPanel(wx.Panel):
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
if haveJoystick:
|
||||
if wx.adv.Joystick.GetNumberJoysticks() != 0:
|
||||
win = JoystickDemoPanel(nb, log)
|
||||
return win
|
||||
else:
|
||||
from wx.lib.msgpanel import MessagePanel
|
||||
win = MessagePanel(nb, 'wx.Joystick is not available on this platform.',
|
||||
win = MessagePanel(nb, 'No joysticks are found on this system.',
|
||||
'Sorry', wx.ICON_WARNING)
|
||||
return win
|
||||
|
||||
|
||||
Reference in New Issue
Block a user