File diff r5111:9a0f9ef7740a → r5112:762ee2364b04
video/win32_v.c
Show inline comments
 
@@ -352,15 +352,15 @@ static LRESULT CALLBACK WndProcGdi(HWND 
 
			wchar_t w = 0;
 
			byte ks[256];
 
			uint scancode;
 
			uint32 pressed_key;
 

	
 
			GetKeyboardState(ks);
 
			if (ToUnicode(wParam, 0, ks, &w, 1, 0) == 0) {
 
			if (ToUnicode(wParam, 0, ks, &w, 1, 0) != 1) {
 
				/* On win9x ToUnicode always fails, so fall back to ToAscii */
 
				if (ToAscii(wParam, 0, ks, &w, 0) == 0) w = 0; // no translation was possible
 
				if (ToAscii(wParam, 0, ks, &w, 0) != 1) w = 0; // no translation was possible
 
			}
 

	
 
			pressed_key = w | MapWindowsKey(wParam) << 16;
 

	
 
			scancode = GB(lParam, 16, 8);
 
			if (scancode == 41) pressed_key = w | WKC_BACKQUOTE << 16;
 
@@ -784,13 +784,12 @@ static void Win32GdiMainLoop(void)
 

	
 
	_wnd.running = true;
 

	
 
	for (;;) {
 
		while (PeekMessage(&mesg, NULL, 0, 0, PM_REMOVE)) {
 
			InteractiveRandom(); // randomness
 
			TranslateMessage(&mesg);
 
			DispatchMessage(&mesg);
 
		}
 
		if (_exit_game) return;
 

	
 
#if defined(_DEBUG)
 
		if (_wnd.has_focus && GetAsyncKeyState(VK_SHIFT) < 0 &&