Fixed the command line specified udp_ip and udp_port not being used for broadcasting in the SDL version.
This commit is contained in:
parent
d2a251430c
commit
62bfc50767
1 changed files with 7 additions and 7 deletions
|
|
@ -42,8 +42,8 @@ class Canvas(object):
|
|||
self.pixeloffset = 2
|
||||
self.fps = 30
|
||||
self.screen = None
|
||||
self.udp_ip = UDP_IP
|
||||
self.udp_port = UDP_PORT
|
||||
self.udp_ip = options.ip if options.ip else UDP_IP
|
||||
self.udp_port = options.port if options.port else UDP_PORT
|
||||
self.factor = options.factor if options.factor else 1
|
||||
self.width = options.width if options.width else DEFAULT_WIDTH
|
||||
self.height = options.height if options.height else DEFAULT_HEIGHT
|
||||
|
|
@ -163,7 +163,7 @@ class Canvas(object):
|
|||
self.broadcastsocket.sendto(
|
||||
'%s:%f %s:%d %d*%d' % (
|
||||
PROTOCOL_PREAMBLE, PROTOCOL_VERSION,
|
||||
UDP_IP, UDP_PORT,
|
||||
self.udp_ip, self.udp_port,
|
||||
self.width/self.factor, self.height/self.factor),
|
||||
('<broadcast>', DISCOVER_PORT))
|
||||
if self.debug:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue