File diff r24938:c6d347f5a77a → r24939:f00f6879a003
src/video/win32_v.cpp
Show inline comments
 
@@ -854,16 +854,27 @@ void VideoDriver_Win32Base::InputLoop()
 
		_dirkeys = 0;
 
	}
 

	
 
	if (old_ctrl_pressed != _ctrl_pressed) HandleCtrlChanged();
 
}
 

	
 
void VideoDriver_Win32Base::MainLoop()
 
bool VideoDriver_Win32Base::PollEvent()
 
{
 
	MSG mesg;
 

	
 
	if (!PeekMessage(&mesg, nullptr, 0, 0, PM_REMOVE)) return false;
 

	
 
	/* Convert key messages to char messages if we want text input. */
 
	if (EditBoxInGlobalFocus()) TranslateMessage(&mesg);
 
	DispatchMessage(&mesg);
 

	
 
	return true;
 
}
 

	
 
void VideoDriver_Win32Base::MainLoop()
 
{
 
	std::thread draw_thread;
 

	
 
	if (this->draw_threaded) {
 
		/* Initialise the mutex first, because that's the thing we *need*
 
		 * directly in the newly created thread. */
 
		try {
 
@@ -895,17 +906,12 @@ void VideoDriver_Win32Base::MainLoop()
 
		}
 
	}
 

	
 
	for (;;) {
 
		InteractiveRandom(); // randomness
 

	
 
		while (PeekMessage(&mesg, nullptr, 0, 0, PM_REMOVE)) {
 
			/* Convert key messages to char messages if we want text input. */
 
			if (EditBoxInGlobalFocus()) TranslateMessage(&mesg);
 
			DispatchMessage(&mesg);
 
		}
 
		if (_exit_game) break;
 

	
 
		/* Flush GDI buffer to ensure we don't conflict with the drawing thread. */
 
		GdiFlush();
 

	
 
		if (this->Tick()) {