boolMouseCanReportHoveredViewport;// This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state.
boolMouseCanReportHoveredViewport;// This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state.
io.SetKeyEventNativeData(key,event->key.keysym.sym,event->key.keysym.scancode,event->key.keysym.scancode);// To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.
io.SetKeyEventNativeData(key,event->key.keysym.sym,event->key.keysym.scancode,event->key.keysym.scancode);// To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.
returntrue;
returntrue;
}
}
#if SDL_HAS_DISPLAY_EVENT
caseSDL_DISPLAYEVENT:
{
// 2.0.26 has SDL_DISPLAYEVENT_CONNECTED/SDL_DISPLAYEVENT_DISCONNECTED/SDL_DISPLAYEVENT_ORIENTATION,
// so change of DPI/Scaling are not reflected in this event. (SDL3 has it)
bd->WantUpdateMonitors=true;
returntrue;
}
#endif
caseSDL_WINDOWEVENT:
caseSDL_WINDOWEVENT:
{
{
// - When capturing mouse, SDL will send a bunch of conflicting LEAVE/ENTER event on every mouse move, but the final ENTER tends to be right.
// - When capturing mouse, SDL will send a bunch of conflicting LEAVE/ENTER event on every mouse move, but the final ENTER tends to be right.
boolMouseCanReportHoveredViewport;// This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state.
boolMouseCanReportHoveredViewport;// This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state.
io.SetKeyEventNativeData(key,event->key.keysym.sym,event->key.keysym.scancode,event->key.keysym.scancode);// To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.
io.SetKeyEventNativeData(key,event->key.keysym.sym,event->key.keysym.scancode,event->key.keysym.scancode);// To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.