Windows: If touch controls are off, and ingame, toggle fullscreen on doubleclick.

This commit is contained in:
Henrik Rydgard committed 2015-09-07 21:21:17 +02:00
1 parent 9d05abda69
commit 70d773f103
1 file changed
+10
+10
View File
@@ -26,6 +26,7 @@
#include <string>
#include "base/NativeApp.h"
#include "base/timeutil.h"
#include "Globals.h"
#include "shellapi.h"
@@ -1010,6 +1011,15 @@ namespace MainWindow
NativeTouch(touch);
SetCapture(hWnd);
// Simulate doubleclick, doesn't work with RawInput enabled
static double lastMouseDown;
double now = real_time_now();
if ((now - lastMouseDown) < 0.2) {
if (!g_Config.bShowTouchControls && GetUIState() == UISTATE_INGAME) {
PostMessage(hwndMain, WM_USER_TOGGLE_FULLSCREEN, 0, 0);
}
}
lastMouseDown = real_time_now();
}
break;