Backends: SDL3: add default case to fix warnings. (#7763)

This commit is contained in:
ocornut 2024-07-02 12:12:25 +02:00
parent 7e0b3b9caf
commit ae708e3bcd
2 changed files with 3 additions and 0 deletions

View File

@ -287,6 +287,7 @@ static ImGuiKey ImGui_ImplSDL2_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scanc
case SDLK_F24: return ImGuiKey_F24; case SDLK_F24: return ImGuiKey_F24;
case SDLK_AC_BACK: return ImGuiKey_AppBack; case SDLK_AC_BACK: return ImGuiKey_AppBack;
case SDLK_AC_FORWARD: return ImGuiKey_AppForward; case SDLK_AC_FORWARD: return ImGuiKey_AppForward;
default: break;
} }
return ImGuiKey_None; return ImGuiKey_None;
} }

View File

@ -168,6 +168,7 @@ static ImGuiKey ImGui_ImplSDL3_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scanc
case SDL_SCANCODE_KP_PLUS: return ImGuiKey_KeypadAdd; case SDL_SCANCODE_KP_PLUS: return ImGuiKey_KeypadAdd;
case SDL_SCANCODE_KP_ENTER: return ImGuiKey_KeypadEnter; case SDL_SCANCODE_KP_ENTER: return ImGuiKey_KeypadEnter;
case SDL_SCANCODE_KP_EQUALS: return ImGuiKey_KeypadEqual; case SDL_SCANCODE_KP_EQUALS: return ImGuiKey_KeypadEqual;
default: break;
} }
switch (keycode) switch (keycode)
{ {
@ -273,6 +274,7 @@ static ImGuiKey ImGui_ImplSDL3_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scanc
case SDLK_F24: return ImGuiKey_F24; case SDLK_F24: return ImGuiKey_F24;
case SDLK_AC_BACK: return ImGuiKey_AppBack; case SDLK_AC_BACK: return ImGuiKey_AppBack;
case SDLK_AC_FORWARD: return ImGuiKey_AppForward; case SDLK_AC_FORWARD: return ImGuiKey_AppForward;
default: break;
} }
return ImGuiKey_None; return ImGuiKey_None;
} }