小编kep*_*kin的帖子

在pygame blit of subsurface中导致错误,subsurface被锁定

这是重现该内容的最小脚本

#!/usr/bin/env python
import pygame

screen = pygame.display.set_mode((640, 480))
screen.fill((255, 255, 255))
screen_half = screen.subsurface((0,0, 640/2.0, 480))

print screen.get_locks()
print screen_half.get_locks()
screen_half.blit(screen_half, (0, 0))
Run Code Online (Sandbox Code Playgroud)

输出是

()
()
Traceback (most recent call last):
  File "./blit_test.py", line 10, in <module>
    screen_half.blit(screen_half, (0, 0))
pygame.error: Surfaces must not be locked during blit
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,带有锁的screenscreen_half 的元组是空的。如果我使用screen而不是screen_half,则不会出现错误。

python pygame

5
推荐指数
1
解决办法
3407
查看次数

MSI:如何加速ExecuteAction

在我目前的MSI中,ExecuteAction需要至少1m 30秒.我创建了一个简单的msi(来自WiX示例),ExecuteAction大约需要4秒.

如何优化我的MSI包,以便ExecuteAction运行得更快?

windows-installer

2
推荐指数
1
解决办法
1694
查看次数

标签 统计

pygame ×1

python ×1

windows-installer ×1