Commit Graph
136 Commits
Author SHA1 Message Date
Henrik Rydgård 203c037b8e DisplayLayoutScreen: Round the right column 2026-10-26 23:27:34 +01:00
Henrik RydgårdandClaude Opus 5.5 e30c8f7141 UI: Give LinearLayout a working padding setting
LinearLayout had a public padding member that only DisplayLayoutScreen set. Make it
private with a setter, and fix the measuring: the vertical retry used the horizontal
padding, the AT_MOST retries and the weighted children ignored it, and growing to fit
weighted children counted it twice.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:24:21 +02:00
Henrik Rydgård ad132d8f1b Apply rounded corners to all Choices by default, apply proper group rounding in many places. 2026-10-24 11:21:40 +02:00
Henrik RydgårdandClaude Opus 5.5 080470d041 Display layout: No editing while the TV shows a layout for another orientation
With the game on a TV (landscape) and the device in portrait, the display
layout screen edited the portrait layout, which the TV doesn't use, so
nothing seemed to change. Its controls are now disabled in that case, and
work as before with the device held the same way as the TV.

The screen rotation hotkeys change the layout the game is shown with, the
TV's, instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 23:06:07 +02:00
Henrik RydgårdandClaude Opus 5.5 923611b445 Display layout: Disable move/resize while the game is on another output
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 18:42:53 +02:00
LunaMooandClaude Opus 5.5 c986b4000f Display layout: keep the overlay on Reset
Reset is about size, position and aspect. The overlay is a separate choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QGBg32EFPsTXjAFu7dnTcz
2026-10-22 14:09:58 +02:00
LunaMooandClaude Opus 5.5 519f282f99 Overlay: follow display offset/scale, avoid needless reloads
- Apply the display layout's scale and offset to the overlay itself instead
  of always centering it, so moving/resizing the display in Display Layout
  moves the overlay with the game inside it, and the portrait default
  (screen high up) is respected.
- Rescanning overlays (done whenever the display layout screen recreates its
  views, e.g. after closing the picker popup) no longer unloads the active
  overlay unless its definition changed.
- Re-picking the current overlay no longer posts GPU config change
  notifications, which caused an audio glitch with a game running behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QGBg32EFPsTXjAFu7dnTcz
2026-10-22 14:09:51 +02:00
LunaMooandClaude Opus 5.5 3ce3973781 Add overlay (bezel) support
Draws a user image around or behind the PSP screen, to fill the black bars
on displays whose aspect ratio doesn't match the PSP's (#20325).

- Overlays are PNGs in PSP/OVERLAYS. A plain PNG there just works: it's
  drawn in front of the game, and its transparent hole is found by walking
  from the image center to each edge until a nearly opaque pixel. Existing
  RetroArch overlay images can be dropped in as-is.
- A subfolder with an overlay.ini can define overlays with a Name, Layer
  (Foreground/Background) and an explicit Hole=x,y,w,h.
- "Load overlay image..." in the display layout screen imports any PNG
  (including Android content URIs) into the overlays folder and selects it.
- The overlay is fit to the screen (aspect preserved, centered). The hole is
  mapped with the same scale, and the game is fit into it with the normal
  stretch / integer scale / aspect ratio options. Offset and scale don't
  apply while an overlay with a hole is active. This goes through
  CalculateDisplayOutputRect, so touch mapping and post shaders agree.
- The selection is a per-orientation, per-game DisplayLayout setting.
- Disabled in VR, Cardboard, and with skip buffer effects (except software
  rendering), since the presentation path doesn't run there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QGBg32EFPsTXjAFu7dnTcz
2026-10-22 14:09:51 +02:00
Henrik RydgårdandClaude Opus 5.5 75ac7b6de8 DisplayLayout: Fix a few stale states
- The aspect ratio slider captured a copy of the layout config, so its
  enabled state never followed the Stretch and Integer scale checkboxes.
- Reset didn't refresh the views, which depend on the rotation.
- The shader list popup kept its old index mapping when recreated, so the
  current shader wasn't highlighted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 10:55:30 +02:00
Henrik Rydgård 7219cd2f5a Split off ScreenManager from Screen.cpp 2026-08-07 14:30:36 +02:00
Henrik Rydgård 6d98293be9 Hide orientation controls on large Android 17 devices, since they won't work. 2026-06-15 10:37:58 +02:00
Henrik Rydgård 75453632f9 Handle inset adjustements on the C++ side, handle them better in the UI. 2026-03-14 18:13:37 +01:00
Henrik Rydgård c5e0403ffd Add the screen rotation control to the display layout page (to reduce confusion) 2026-03-14 09:52:35 +01:00
Henrik Rydgård 62d1c05ca2 Fix minor issue on display layout screen 2026-02-01 14:19:51 +01:00
Henrik Rydgård c232867fba Correct functionality of the display rotation control rotation.
Fixes #19775

A future step might be to also rotate the touch screen inputs..
2026-01-23 01:18:58 +01:00
Henrik Rydgård 481d0fd18c Switch TouchInputFlags to enum class, fix some minor UI issues
Scroll views now only wheel-scroll if the mouse is hovering over them.
2025-12-19 11:38:56 +01:00
Henrik Rydgård fedf86164b Minor layout change on display layout screen 2025-11-27 13:55:09 +01:00
Henrik Rydgård 1ea93e2913 Small refactor of text rect measurement. Add move/resize icons 2025-11-27 11:50:22 +01:00
Henrik Rydgård 7853881210 GPU header cleanup: Avoid including GPUCommon.h in some places 2025-11-23 20:37:37 +01:00
Henrik Rydgård 759d8498ca Fix resetting the DisplayLayout 2025-11-22 16:29:55 +01:00
Henrik Rydgård 77c7ba1435 Rework the pause screen in portrait mode. Right-align popup menus if too far to the right on the screen. 2025-11-22 14:31:01 +01:00
Henrik Rydgård 9de8e75709 AnchorLayout: Allow centering separately for horizontal and vertical 2025-11-10 12:10:08 +01:00
Henrik Rydgård 063c7d4f7e Get separate touch screen config for portrait working 2025-11-05 21:01:37 +01:00
Henrik Rydgård eab2cc85bc Sneak in a critical bugfix in config loading, oops. Also fix minor bug reported by oltolm. 2025-11-05 20:29:12 +01:00
Henrik Rydgård 2d9ceb8ccf Display layout: Add orientation indicator. Also, the stretch option was inconsistent between UI and actual application 2025-11-05 12:49:52 +01:00
Henrik Rydgård 67010ff2af Split the display layout config between landscape and portrait orientations 2025-11-05 12:49:51 +01:00
Henrik Rydgård 2b9f2672bb UI screens header cleanup 2025-10-29 00:15:41 +01:00
Henrik Rydgård 7ffd72b32e Rename some screen classes 2025-10-29 00:02:43 +01:00
Henrik Rydgård acf273a55a Rename "vertical layout" to "portrait layout", to avoid confusion 2025-10-23 16:11:54 +02:00
Henrik Rydgård b45d07d6cb Break out TabHolder from Common/UI/ViewGroup.cpp. A few new atlas images 2025-10-23 11:19:20 +02:00
Henrik Rydgård 58456ae950 Remove the UI::EventReturn return values. Makes editing the UI nicer. 2025-09-15 11:09:00 -06:00
Henrik Rydgård 09e067c6e1 Revert "Get rid of remains of support for non-square screen DPIs"
This reverts commit f206ed95eb.
2025-05-21 21:41:50 +02:00
Henrik Rydgård 088a02bfdb Cleanup a lot of the bootup state management. 2025-03-30 14:02:29 +02:00
Henrik Rydgård 116f8cf3af Implement resetting from a popup menu on the pause menu. 2025-03-28 14:31:01 +01:00
Henrik Rydgård f206ed95eb Get rid of remains of support for non-square screen DPIs 2025-02-20 11:14:26 -06:00
Henrik Rydgård b226dd329f Postshader: Fix issue where some changes weren't reflected until resizing the window 2024-10-29 16:15:46 +01:00
Henrik Rydgård f86b55c481 Postshader: Work around a play-reported race condition (haven't figured out how to hit it, though). 2024-10-29 15:50:47 +01:00
Henrik Rydgård 2c283fbb07 Minor cleanups, crashfixes 2024-10-14 23:57:19 +02:00
Henrik Rydgård d7d37e58d4 Remove the title from the "Rotation" popup button. Fixes #17201 2024-07-19 09:55:22 +02:00
Herman Semenov 117e5f088c [UI] Fixed 'info' always true 2024-04-12 13:54:26 +03:00
Henrik Rydgård c5791764d8 Make the i18n T function use std::string_view
Buildfixes, crashfixes

One more

Android buildfix

Buildfix Qt
2024-02-12 18:44:39 +01:00
Herman Semenov 95f535dab0 [UI/Windows] Object out of scope optimization for better codegeneration (lower level scope) 2023-12-20 12:35:02 +03:00
Henrik Rydgård 6d51fbc1e6 Refactor UI background rendering. There's now a BackgroundScreen. 2023-12-10 22:26:46 +01:00
Henrik Rydgård 19e4de5088 Change global UI messages to use an enum instead of strings.
Makes it easier to add new ones and delete outdated ones without missing
any uses.
2023-09-30 11:37:02 +02:00
Henrik Rydgård 84fffec4f3 Switch all NativeMessageReceived to System_PostUIMessage 2023-07-06 17:26:02 +02:00
Henrik Rydgård ee6234ecb6 I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Henrik Rydgård 4e0babc950 Add a "reset to default" for all float-slider settings
Unfortunately, the default values from the configs are not exposed
outside Config.cpp, so there's duplication.

Need to figure out how to do fix that, but it's out-of-scope for this
PR.
2023-04-05 10:50:53 +02:00
Henrik Rydgård 8f96ec371e Rename iBufFilter -> iDisplayFilter 2023-04-05 09:34:18 +02:00
Henrik Rydgård d223d3c316 Rename CenterDisplayOutputRect to CalculateDisplayOutputRect 2023-04-02 22:29:08 +02:00
Henrik Rydgård 2fa93982ea Add support for integer scale factor for display
This is mainly useful if you want an authentic pixellated look with 1x
rendering (or software) and nearest display filter. It'll simply round
down the auto-scaled sized to the nearest integer scale factor,
configuring exactly which one isn't that interesting since they all are
gonna look good.

Fixes #17093
2023-04-02 22:29:08 +02:00