Big mutex overhaul - remove our custom ones, make them non-recursive where possible

This commit is contained in:
Henrik Rydgard authored and Henrik Rydgård committed 2017-02-28 11:40:29 +01:00
1 parent 54f862cda6
commit 26a2d42731
75 files changed
+561 -882

No files matched your search

+3 -3
View File
@@ -543,7 +543,7 @@ namespace MainWindow
// Hack: Take the opportunity to show the cursor.
mouseButtonDown = true;
{
lock_guard guard(input_state.lock);
std::lock_guard<std::mutex> guard(input_state.lock);
input_state.mouse_valid = true;
input_state.pointer_down[0] = true;
@@ -589,7 +589,7 @@ namespace MainWindow
prevCursorY = cursorY;
{
lock_guard guard(input_state.lock);
std::lock_guard<std::mutex> guard(input_state.lock);
input_state.pointer_x[0] = GET_X_LPARAM(lParam) * g_dpi_scale;
input_state.pointer_y[0] = GET_Y_LPARAM(lParam) * g_dpi_scale;
}
@@ -612,7 +612,7 @@ namespace MainWindow
// Hack: Take the opportunity to hide the cursor.
mouseButtonDown = false;
{
lock_guard guard(input_state.lock);
std::lock_guard<std::mutex> guard(input_state.lock);
input_state.pointer_down[0] = false;
input_state.pointer_x[0] = GET_X_LPARAM(lParam) * g_dpi_scale;
input_state.pointer_y[0] = GET_Y_LPARAM(lParam) * g_dpi_scale;