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.pixeloffset = 2
|
||||||
self.fps = 30
|
self.fps = 30
|
||||||
self.screen = None
|
self.screen = None
|
||||||
self.udp_ip = UDP_IP
|
self.udp_ip = options.ip if options.ip else UDP_IP
|
||||||
self.udp_port = UDP_PORT
|
self.udp_port = options.port if options.port else UDP_PORT
|
||||||
self.factor = options.factor if options.factor else 1
|
self.factor = options.factor if options.factor else 1
|
||||||
self.width = options.width if options.width else DEFAULT_WIDTH
|
self.width = options.width if options.width else DEFAULT_WIDTH
|
||||||
self.height = options.height if options.height else DEFAULT_HEIGHT
|
self.height = options.height if options.height else DEFAULT_HEIGHT
|
||||||
|
|
@ -163,7 +163,7 @@ class Canvas(object):
|
||||||
self.broadcastsocket.sendto(
|
self.broadcastsocket.sendto(
|
||||||
'%s:%f %s:%d %d*%d' % (
|
'%s:%f %s:%d %d*%d' % (
|
||||||
PROTOCOL_PREAMBLE, PROTOCOL_VERSION,
|
PROTOCOL_PREAMBLE, PROTOCOL_VERSION,
|
||||||
UDP_IP, UDP_PORT,
|
self.udp_ip, self.udp_port,
|
||||||
self.width/self.factor, self.height/self.factor),
|
self.width/self.factor, self.height/self.factor),
|
||||||
('<broadcast>', DISCOVER_PORT))
|
('<broadcast>', DISCOVER_PORT))
|
||||||
if self.debug:
|
if self.debug:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue