mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Examples: DirectX9-10-11: Only call Windows' SetCursor(NULL) when io.MouseDrawCursor is set (#585, #909)
This commit is contained in:
		| @@ -573,7 +573,8 @@ void ImGui_ImplDX10_NewFrame() | |||||||
|     // io.MouseWheel : filled by WM_MOUSEWHEEL events |     // io.MouseWheel : filled by WM_MOUSEWHEEL events | ||||||
|  |  | ||||||
|     // Hide OS mouse cursor if ImGui is drawing it |     // Hide OS mouse cursor if ImGui is drawing it | ||||||
|     SetCursor(io.MouseDrawCursor ? NULL : LoadCursor(NULL, IDC_ARROW)); |     if (io.MouseDrawCursor) | ||||||
|  |         SetCursor(NULL); | ||||||
|  |  | ||||||
|     // Start the frame |     // Start the frame | ||||||
|     ImGui::NewFrame(); |     ImGui::NewFrame(); | ||||||
|   | |||||||
| @@ -576,7 +576,8 @@ void ImGui_ImplDX11_NewFrame() | |||||||
|     // io.MouseWheel : filled by WM_MOUSEWHEEL events |     // io.MouseWheel : filled by WM_MOUSEWHEEL events | ||||||
|  |  | ||||||
|     // Hide OS mouse cursor if ImGui is drawing it |     // Hide OS mouse cursor if ImGui is drawing it | ||||||
|     SetCursor(io.MouseDrawCursor ? NULL : LoadCursor(NULL, IDC_ARROW)); |     if (io.MouseDrawCursor) | ||||||
|  |         SetCursor(NULL); | ||||||
|  |  | ||||||
|     // Start the frame |     // Start the frame | ||||||
|     ImGui::NewFrame(); |     ImGui::NewFrame(); | ||||||
|   | |||||||
| @@ -339,7 +339,8 @@ void ImGui_ImplDX9_NewFrame() | |||||||
|     // io.MouseWheel : filled by WM_MOUSEWHEEL events |     // io.MouseWheel : filled by WM_MOUSEWHEEL events | ||||||
|  |  | ||||||
|     // Hide OS mouse cursor if ImGui is drawing it |     // Hide OS mouse cursor if ImGui is drawing it | ||||||
|     SetCursor(io.MouseDrawCursor ? NULL : LoadCursor(NULL, IDC_ARROW)); |     if (io.MouseDrawCursor) | ||||||
|  |         SetCursor(NULL); | ||||||
|  |  | ||||||
|     // Start the frame |     // Start the frame | ||||||
|     ImGui::NewFrame(); |     ImGui::NewFrame(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user