mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-26 02:25:26 +08:00
Backends: fixed reappearing uses to NULL to favor nullptr.
scheduled / scheduled (push) Has been cancelled
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
This commit is contained in:
@@ -191,7 +191,7 @@ static void ImGui_ImplSDL3_UpdateIme()
|
||||
SDL_StopTextInput(bd->ImeWindow);
|
||||
bd->ImeWindow = nullptr;
|
||||
}
|
||||
if ((!bd->ImeDirty && bd->ImeWindow == window) || (window == NULL))
|
||||
if ((!bd->ImeDirty && bd->ImeWindow == window) || (window == nullptr))
|
||||
return;
|
||||
|
||||
// Start/update current input
|
||||
@@ -663,7 +663,7 @@ static void ImGui_ImplSDL3_UpdateMouseData()
|
||||
// Note that SDL_GetGlobalMouseState() is in theory slow on X11, but this only runs on rather specific cases. If a problem we may provide a way to opt-out this feature.
|
||||
SDL_Window* hovered_window = SDL_GetMouseFocus();
|
||||
const bool is_relative_mouse_mode = SDL_GetWindowRelativeMouseMode(bd->Window);
|
||||
if (hovered_window == NULL && bd->MouseCanUseGlobalState && bd->MouseButtonsDown == 0 && !is_relative_mouse_mode)
|
||||
if (hovered_window == nullptr && bd->MouseCanUseGlobalState && bd->MouseButtonsDown == 0 && !is_relative_mouse_mode)
|
||||
{
|
||||
// Single-viewport mode: mouse position in client window coordinates (io.MousePos is (0,0) when the mouse is on the upper-left corner of the app window)
|
||||
float mouse_x, mouse_y;
|
||||
|
||||
Reference in New Issue
Block a user