[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] gamepad problem on osx



hi

I have no idea, but wonder what Pygame version and OSX version you use next to Python 2.3. Else I recommend you try the most latest ones (Python 2.4.1, Pygame 1.7.x)
A good page to get Python related software for Mac is: http://pythonmac.org/

i am running osx 10.3.9 with python 2.4.1. The pygame version is 1.7.0

Another point is the compatibilty of the Logitech Pad. I assume you got an USB 1.1 on your G3. Is the game Pad also compatible to that version or only 2.0?

it does not say anything but my desktop only has usb 1 as well and it runs fine there.


Guess you have to find out if the problem comes from Joypad (compatibilty), older versions of older applications (Pygame < 1.7.x) or any driver problems on possible OSX version.

mmm ... i think it might be something to do with the system rather than pygame. The gamepad is supposed to be compatible with os9 and osx but it doesnt provide any special drivers for mac.


Just my 2 cents

thanks

Tyger


Am 07.03.2006 um 16:17 schrieb altern:

hi

I am using pygame to get info from a gamepad (logitech dual action usb). The script is really simple and it runs fine on my debian desktop but it gets kind of blocked on my G3 500mhz iBook.

It prints some data with the intialisation values and no matter how many buttons i press it doesnt change. However when i type in the keyboard it does print the keyboard event, so the script is not frozen, it just looks like it doesnt get anything from the gamepad.

Anyone has any idea why this could be happening?

This is the code, nothing fancy about it

thanks!



#!/usr/local/bin/python2.3

import pygame
import pygame.event
from pygame.locals import *



try: # joystick pygame.joystick.init() # init main joystick device system for n in range(pygame.joystick.get_count()): # stick = pygame.joystick.Joystick(n) stick.init() # init instance # report joystick charateristics # print '-'*20 print 'Enabled joystick: ' + stick.get_name() print 'it has the following devices :' print '--> buttons : '+ str(stick.get_numbuttons()) print '--> balls : '+ str(stick.get_numballs()) print '--> axes : '+ str(stick.get_numaxes()) print '--> hats : '+ str(stick.get_numhats()) print '-'*20 except pygame.error: print 'no joystick found.'


def main():

    pygame.init()

clock = pygame.time.Clock()

while 1 : clock.tick(20) for e in pygame.event.get(): print e # PRINT all events


if __name__ == '__main__': main()





--
enrike