mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
testcontroller: make sure touchpad touches are visible even at very light pressure
This commit is contained in:
parent
bb3c61390a
commit
a95f5f9874
1 changed files with 1 additions and 1 deletions
|
|
@ -999,7 +999,7 @@ void RenderGamepadImage(GamepadImage *ctx)
|
|||
dst.y -= ctx->button_height / 2;
|
||||
dst.w = ctx->button_width;
|
||||
dst.h = ctx->button_height;
|
||||
SDL_SetTextureAlphaMod(ctx->button_texture, (Uint8)(finger->pressure * SDL_ALPHA_OPAQUE));
|
||||
SDL_SetTextureAlphaMod(ctx->button_texture, (Uint8)((0.1f + (finger->pressure * 0.9f)) * SDL_ALPHA_OPAQUE));
|
||||
SDL_RenderTexture(ctx->renderer, ctx->button_texture, NULL, &dst);
|
||||
SDL_SetTextureAlphaMod(ctx->button_texture, SDL_ALPHA_OPAQUE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue