Просмотр исходного кода

Merge pull request #507 from fodinabor/InputFixes

Fix mouse input lag while keyboard input - old projects should update th...
Ivan Safrin 11 лет назад
Родитель
Сommit
6cf96e2aac

+ 1 - 1
Assets/Templates/C++/Windows/PolycodeTemplate.cpp

@@ -12,7 +12,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
 
 	MSG Msg;
 	do {
-		if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) {
+		while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
 			TranslateMessage(&Msg);
 			DispatchMessage(&Msg);
 		}

+ 1 - 1
Examples/C++/Build/Windows/PolycodeExamples/PolycodeExample.cpp

@@ -12,7 +12,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
 
 	MSG Msg;
 	do {
-		if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) {
+		while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
 			TranslateMessage(&Msg);
 			DispatchMessage(&Msg);
 		}

+ 1 - 1
IDE/Build/Windows/main.cpp

@@ -88,7 +88,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
 
 	MSG Msg;
 	do {
-		if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) {
+		while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
 			TranslateMessage(&Msg);
 			DispatchMessage(&Msg);
 		}

+ 1 - 1
IDE/Build/Windows2013/main.cpp

@@ -92,7 +92,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
 
 	MSG Msg;
 	do {
-		if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) {
+		while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
 
 			if (!TranslateAccelerator(view->hwnd, view->haccel, &Msg)) {
 				TranslateMessage(&Msg);

+ 1 - 1
Player/Build/MSVC/PolycodePlayer/main.cpp

@@ -77,7 +77,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
 	MSG Msg;
 
 		do {
-			if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) {
+			while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
 				TranslateMessage(&Msg);
 				DispatchMessage(&Msg);
 			}

+ 1 - 1
Player/Contents/Platform/Windows/Standalone/main.cpp

@@ -37,7 +37,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
 	MSG Msg;
 
 		do {
-			if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) {
+			while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
 				TranslateMessage(&Msg);
 				DispatchMessage(&Msg);
 			}

+ 1 - 1
Player/Contents/Platform/Windows/main.cpp

@@ -48,7 +48,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
 	MSG Msg;
 
 		do {
-			if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) {
+			while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) {
 				TranslateMessage(&Msg);
 				DispatchMessage(&Msg);
 			}