mouse: Move mouse button state from a Uint32 to a formal typedef.

Reference Issue #9812.
This commit is contained in:
Ryan C. Gordon
2024-05-25 22:54:31 -04:00
parent 13b18e3c41
commit cf2874080f
13 changed files with 60 additions and 56 deletions

View File

@@ -941,7 +941,7 @@ static void SDLTest_PrintModState(char *text, size_t maxlen, SDL_Keymod keymod)
}
}
static void SDLTest_PrintButtonMask(char *text, size_t maxlen, Uint32 flags)
static void SDLTest_PrintButtonMask(char *text, size_t maxlen, SDL_MouseButtonFlags flags)
{
int i;
int count = 0;
@@ -2374,7 +2374,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
if (withControl) {
/* Ctrl-A reports absolute mouse position. */
float x, y;
const Uint32 mask = SDL_GetGlobalMouseState(&x, &y);
const SDL_MouseButtonFlags mask = SDL_GetGlobalMouseState(&x, &y);
SDL_Log("ABSOLUTE MOUSE: (%g, %g)%s%s%s%s%s\n", x, y,
(mask & SDL_BUTTON_LMASK) ? " [LBUTTON]" : "",
(mask & SDL_BUTTON_MMASK) ? " [MBUTTON]" : "",
@@ -2478,7 +2478,7 @@ void SDLTest_CommonDrawWindowInfo(SDL_Renderer *renderer, SDL_Window *window, fl
SDL_Rect rect;
const SDL_DisplayMode *mode;
float scaleX, scaleY;
Uint32 flags;
SDL_MouseButtonFlags flags;
SDL_DisplayID windowDisplayID = SDL_GetDisplayForWindow(window);
SDL_RendererInfo info;
SDL_RendererLogicalPresentation logical_presentation;