mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
testcontroller: show face button labels over the activity highlight
This commit is contained in:
@@ -551,25 +551,6 @@ void RenderGamepadImage(GamepadImage *ctx)
|
||||
|
||||
if (ctx->showing_front) {
|
||||
SDL_RenderTexture(ctx->renderer, ctx->front_texture, NULL, &dst);
|
||||
|
||||
dst.x = (float)ctx->x + 363;
|
||||
dst.y = (float)ctx->y + 116;
|
||||
dst.w = (float)ctx->face_width;
|
||||
dst.h = (float)ctx->face_height;
|
||||
|
||||
switch (ctx->face_style) {
|
||||
case GAMEPAD_IMAGE_FACE_ABXY:
|
||||
SDL_RenderTexture(ctx->renderer, ctx->face_abxy_texture, NULL, &dst);
|
||||
break;
|
||||
case GAMEPAD_IMAGE_FACE_BAYX:
|
||||
SDL_RenderTexture(ctx->renderer, ctx->face_bayx_texture, NULL, &dst);
|
||||
break;
|
||||
case GAMEPAD_IMAGE_FACE_SONY:
|
||||
SDL_RenderTexture(ctx->renderer, ctx->face_sony_texture, NULL, &dst);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
SDL_RenderTexture(ctx->renderer, ctx->back_texture, NULL, &dst);
|
||||
}
|
||||
@@ -592,6 +573,27 @@ void RenderGamepadImage(GamepadImage *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->showing_front) {
|
||||
dst.x = (float)ctx->x + 363;
|
||||
dst.y = (float)ctx->y + 116;
|
||||
dst.w = (float)ctx->face_width;
|
||||
dst.h = (float)ctx->face_height;
|
||||
|
||||
switch (ctx->face_style) {
|
||||
case GAMEPAD_IMAGE_FACE_ABXY:
|
||||
SDL_RenderTexture(ctx->renderer, ctx->face_abxy_texture, NULL, &dst);
|
||||
break;
|
||||
case GAMEPAD_IMAGE_FACE_BAYX:
|
||||
SDL_RenderTexture(ctx->renderer, ctx->face_bayx_texture, NULL, &dst);
|
||||
break;
|
||||
case GAMEPAD_IMAGE_FACE_SONY:
|
||||
SDL_RenderTexture(ctx->renderer, ctx->face_sony_texture, NULL, &dst);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->showing_front) {
|
||||
for (i = 0; i < SDL_arraysize(axis_positions); ++i) {
|
||||
const int element = SDL_GAMEPAD_BUTTON_MAX + i;
|
||||
|
Reference in New Issue
Block a user