Win32 gaming Application is freezing after due to CEFMsgLoop

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Win32 gaming Application is freezing after due to CEFMsgLoop

Postby sridhark » Fri Mar 16, 2018 10:18 am

Hi,
We have win32 application with CEF browser. In the same application when we open multiple game windows which are native windows [not browser windows] we are getting lag in the application after 2-3 hours of game play in the native windows. We are using multi_threaded_message_loop = false and using the below code in our winapp class. Is there any issue with this ?

BOOL CMyWinApp::PumpMessage()
{
BOOL bRet = CWinApp::PumpMessage();
CEFBrowser::CefDoMessageLoopWork();
return bRet;

}
sridhark
Newbie
 
Posts: 7
Joined: Fri Aug 04, 2017 8:47 am

Re: Win32 gaming Application is freezing after due to CEFMsg

Postby Czarek » Sun Mar 18, 2018 9:57 am

This code doesn't show how often you call CefDoMessageLoopWork. I usually call it every 10ms. There is an example implementation of external message pump in cef/tests/ directory.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 55 guests