Fix some bugs and mistakes found by Nemoumbra through static analysis

This commit is contained in:
Henrik Rydgård committed 2023-11-26 13:43:11 +01:00
1 parent aec0606ba4
commit dae758e5f4
3 files changed
+5 -7

No files matched your search

+1 -1
View File
@@ -660,7 +660,7 @@ namespace MainWindow
double now = time_now_d();
if ((now - lastMouseDown) < 0.001 * GetDoubleClickTime()) {
float dx = lastMouseDownX - x;
float dy = lastMouseDownX - x;
float dy = lastMouseDownY - y;
float distSq = dx * dx + dy * dy;
if (distSq < 3.0f*3.0f && !g_Config.bShowTouchControls && !g_Config.bMouseControl && GetUIState() == UISTATE_INGAME && g_Config.bFullscreenOnDoubleclick) {
SendToggleFullscreen(!g_Config.UseFullScreen());