bindtexture: fix usage of unicode filename in source attribute. closes #671

This commit is contained in:
Mathieu Virbel 2012-10-29 02:20:43 +01:00
parent fb3ce12c90
commit b40d6b7fe2
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ cdef class Color(ContextInstruction):
cdef class BindTexture(ContextInstruction):
cdef int _index
cdef bytes _source
cdef object _source
cdef Texture _texture
cdef void apply(self)

View File

@ -285,9 +285,9 @@ cdef class BindTexture(ContextInstruction):
'''
def __get__(self):
return self._source
def __set__(self, bytes filename):
def __set__(self, filename):
Logger.trace('BindTexture: setting source: <%s>' % filename)
self._source = <bytes>resource_find(filename)
self._source = resource_find(filename)
if self._source:
tex = Cache.get('kv.texture', filename)
if not tex: