Skip to content

Improve simulator UI, displays, Unicode paths, and SD handling - #62

Open
oldgamer6753 wants to merge 1 commit into
p3p:masterfrom
oldgamer6753:fix/unicode-file-paths
Open

Improve simulator UI, displays, Unicode paths, and SD handling#62
oldgamer6753 wants to merge 1 commit into
p3p:masterfrom
oldgamer6753:fix/unicode-file-paths

Conversation

@oldgamer6753

Copy link
Copy Markdown

Summary

This PR improves the simulator UI, display rendering, Unicode file-path support, SD image handling, and file dialog behavior.

The changes are contained in a single commit and are based directly on the current master.

The implementation is intended to remain cross-platform. Platform-specific handling is used only where required, such as UTF-8 file opening on Windows.
UTF-8-aware file opening is used on Windows via wide-character paths, while the native POSIX file-opening path is preserved on other platforms.

This PR is independent of #61 and does not require the simulator stability / CPU usage changes from that PR.

Changes

Simulator UI

  • Start the simulator maximized.
  • Open the Display and SD Card component sections by default.
  • Keep the Display component above SD Card in the Components list.
  • Add Collapse Components List to the main menu to collapse all component sections at once.
  • Keep active display popout windows independent of the collapsed / scrolled state of the Components list.
  • Add clearer styling to the top-level menu:
    • 1 px #6dcff6 border when not hovered.
    • 10 px spacing between top-level menu items.
    • Preserve the original hover style.
  • Replace the File > Quit menu with a direct Exit menu item.
  • Rename Break to Debugger Break and move it below the normal simulation controls.
  • Always reserve the vertical scrollbar in the Components window to avoid layout oscillation while resizing.

Display rendering

  • Add a shared sharp-bilinear framebuffer rendering helper.
  • Use sharp bilinear filtering when Integer Scaling is disabled for smoother and cleaner display rendering at non-integer scales.
  • Preserve nearest-neighbor rendering when Integer Scaling is enabled.
  • Use the shared framebuffer rendering helper for ST7796, HD44780, and ST7920
  • Prevent mouse-wheel interaction with an embedded display from blocking Components list scrolling.
  • Keep display popout windows visible when their component entry is scrolled out of view or collapsed.

Unicode support

  • Embed GNU Unifont 17.0.05 directly in the simulator.
  • Add the corresponding OFL license and notice files.
  • Improve Cyrillic and other Unicode text rendering without requiring an external font file.
  • Add UTF-8-aware file opening on Windows using wide-character paths.
  • Keep the non-Windows file-opening path unchanged.

SD Card handling

  • Remember the selected SD image path in imgui.ini.
  • Reopen the file dialog in the directory of the previously selected image.
  • Fall back safely if that directory no longer exists.
  • Add SD image validation / audit status:
    • Passed
    • File is missing
    • File is corrupted
  • Prevent an invalid SD image from being forced into the Present state.
  • Improve the IMG Audit status indicator with a vertically aligned 8×8 px status square.
  • Center and enlarge the SD image file dialog.

File dialog

  • Update ImGuiFileDialog from 0.6.7 to 0.6.8.
  • Enable std::filesystem.
  • Enable Escape to close dialogs.
  • Enable the Places / Devices pane.
  • Improve Windows drive enumeration.
  • Allow selecting drives with a single click.
  • Suppress unnecessary tooltips for non-editable entries in the Devices pane.

Testing

Tested on:

  • Windows 10
  • pio run -e simulator_windows
  • ST7796 simulator display

Verified:

  • Clean build from current upstream/master.
  • Simulator starts and runs normally.
  • Unicode / Cyrillic SD image paths work.
  • SD image path persists across restarts.
  • Missing and corrupted SD images are detected correctly.
  • File dialog opens in the expected directory.
  • Drive selection works correctly.
  • Integer Scaling remains pixel-perfect.
  • Sharp bilinear rendering works when Integer Scaling is disabled.
  • Display popout remains visible while scrolling or collapsing the Components list.
  • Collapse Components List works correctly.
  • Existing simulator functionality continues to operate normally.

The implementation is intended to remain cross-platform, but this PR has currently only been built and runtime-tested on Windows.

Relation to PR #61

This PR does not depend on #61.

It was rebuilt and tested separately on the current upstream/master without the commit from #61.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant