|
|
|
@ -6,6 +6,8 @@ import enum
@@ -6,6 +6,8 @@ import enum
|
|
|
|
|
import threading |
|
|
|
|
import argparse |
|
|
|
|
import subprocess |
|
|
|
|
import socket |
|
|
|
|
import struct |
|
|
|
|
import blup.frame |
|
|
|
|
import blup.output |
|
|
|
|
|
|
|
|
@ -29,7 +31,7 @@ class Game(object):
@@ -29,7 +31,7 @@ class Game(object):
|
|
|
|
|
if self.pygame: |
|
|
|
|
args += ['--pygame'] |
|
|
|
|
if self.output is not None: |
|
|
|
|
args += ['--output', self.output] |
|
|
|
|
args += ['--out', self.output] |
|
|
|
|
return args |
|
|
|
|
|
|
|
|
|
class PongGame(Game): |
|
|
|
@ -257,7 +259,9 @@ class BalanceInput(AbstractInput, threading.Thread):
@@ -257,7 +259,9 @@ class BalanceInput(AbstractInput, threading.Thread):
|
|
|
|
|
print('player_id=%d debounce %s' % (self.player_id, evt)) |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
self.evt = evt |
|
|
|
|
if self.lastevent != evt: |
|
|
|
|
self.evt = evt |
|
|
|
|
self.lastevent = evt |
|
|
|
|
print('player_id=%d event=%s' % (self.player_id, self.evt)) |
|
|
|
|
|
|
|
|
|
else: |
|
|
|
|