Skip to content

Commit

Permalink
Examples: Win32: Fixes for MingW which doesn't support a 2007 define?…
Browse files Browse the repository at this point in the history
… I have no idea why people still use MingW (ocornut#1704, ocornut#1463)
  • Loading branch information
ocornut committed Mar 28, 2018
1 parent cc96477 commit ca39070
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/directx10_example/imgui_impl_dx10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ static bool ImGui_ImplWin32_UpdateMouseCursor()
return true;
}

// MingW (which is stuck in the past) doesn't have this Vista-era define..
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif

// Process Win32 mouse/keyboard inputs.
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
Expand Down
5 changes: 5 additions & 0 deletions examples/directx11_example/imgui_impl_dx11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ static bool ImGui_ImplWin32_UpdateMouseCursor()
return true;
}

// MingW (which is stuck in the past) doesn't have this Vista-era define..
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif

// Process Win32 mouse/keyboard inputs.
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
Expand Down
5 changes: 5 additions & 0 deletions examples/directx12_example/imgui_impl_dx12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ static bool ImGui_ImplWin32_UpdateMouseCursor()
return true;
}

// MingW (which is stuck in the past) doesn't have this Vista-era define..
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif

// Process Win32 mouse/keyboard inputs.
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
Expand Down
5 changes: 5 additions & 0 deletions examples/directx9_example/imgui_impl_dx9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ static bool ImGui_ImplWin32_UpdateMouseCursor()
return true;
}

// MingW (which is stuck in the past) doesn't have this Vista-era define..
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif

// Process Win32 mouse/keyboard inputs.
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
Expand Down

0 comments on commit ca39070

Please sign in to comment.