由于我一直收到这些错误:
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
main: ../../src/xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
编辑:有时我也会收到此错误:
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 48888 requests (48888 known processed) with 0 events remaining.
我试图使我的程序多线程安全,所以我在直接访问像素之前调用 SDL_LockSurface。
我知道这些函数访问像素:
int SDL_BlitSurface(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect);
int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
还有其他直接访问像素的功能吗?