某些mac上的set_mode((800,600),FULLSCREEN | DOUBLEBUF,32)失败

时间:2014-07-03 18:02:43

标签: macos pygame sdl

我不知道为什么这行代码在某些macbook pro上崩溃了。

pygame.display.set_mode((800,600), FULLSCREEN|DOUBLEBUF, 32)

如果我删除FULLSCREEN,它运行良好。

显示分辨率为1680*1050。如果我将显示分辨率设置为800*600(stretched)则可行。如果我将其设置为800*600,仍然会崩溃。

崩溃信息是:

unrecognized selector sent to instance 0x102c0b950'
*** Call stack at first throw:
(
0   CoreFoundation                      0x00007fff801d8784 __exceptionPreprocess + 180
1   libobjc.A.dylib                     0x00007fff82a40f03 objc_exception_throw + 45
2   CoreFoundation                      0x00007fff80232110 +[NSObject(NSObject) doesNotRecognizeSelector:] + 0
3   CoreFoundation                      0x00007fff801aa8ef ___forwarding___ + 751
4   CoreFoundation                      0x00007fff801a6a38 _CF_forwarding_prep_0 + 232
5   SDL                                 0x0000000100797edf SDL_SoftStretch + 22899
6   SDL                                 0x000000010079131a SDL_Linked_Version + 242
7   SDL                                 0x000000010079c967 SDL_SemPost + 209
8   libSystem.B.dylib                   0x00007fff81d06fd6 _pthread_start + 331
9   libSystem.B.dylib                   0x00007fff81d06e89 thread_start + 13
)

terminate called after throwing an instance of 'NSException'
Abort trap

0 个答案:

没有答案