* Array size UB fixes
* Fix ShieldD
* Remove (almost) all unsafe strcpy calls
Bunch of macros. C arrays are easy enough and just need a different call. For various cases where a char* is passed around bare, I've made a TEXT_SPAN macro that can store a length too for bounds checking.
* Move crash handling in safe string operations to separate TU
* strcat safe version
* sprintf made safe too
* Fix compile
alpha comparison mID is u16, but indexes into a 256-item table.
this causes MAT3 materials with an alpha comparison index of 0xFF crashes on linux
closes#1073closes#1531
When howling suns song near actors that arent howl stones, an empty howl tab was shown.
This fixes the issue by duplicating a check for sun's song howling into the relevant code branch.
* linux: Fix Wayland window associations
`src/m_Do/m_Do_main.cpp` uses `SDL_SetAppMetadata("Dusklight", DUSK_VERSION_STRING, "dev.twilitrealm.dusk")` which results in the Wayland appId getting set to `dev.twilitrealm.dusk`. Wayland compositors associate Wayland windows to desktop files by comparing the window appId against installed desktop files by the name of the desktop files. For a given window with appId `dev.twilitrealm.dusk` it would look for `dev.twilitrealm.dusk.desktop`, and because the desktop file is not named that the compositor is unable to correctly associate the window which results in the default Wayland icon being shown for the window. It also results in windows not being associated with the given launcher if the desktop file is pinned to a task management widget of some kind.
Fix this by renaming the desktop file to `dev.twilitrealm.dusk.desktop`. Also while we're at it we can rename the icons as well to match the desktop file name, which isn't required but is a bit cleaner and will fit various packaging standards better.
Signed-off-by: Reilly Brogan <reilly@reillybrogan.com>
* Use dev.twilitrealm.dusk instead
---------
Signed-off-by: Reilly Brogan <reilly@reillybrogan.com>
- Enabled the Android UI path for changing the data folder
- Added Android MANAGE_EXTERNAL_STORAGE permission
- Added an Android flow to request “All files access” before opening the folder picker
- Added code path to resume the folder selection flow after returning from Android settings
- Improved the Android write-probe error message to point users at the required permission
* ci: Try arm64 Linux/Windows builds
* Update aurora
* Explicitly set CMAKE_SYSTEM_PROCESSOR on Windows
* Update build-appimage.sh for aarch64
* Set Rust_RUSTUP_INSTALL_MISSING_TARGET=ON
* Use CMAKE_SYSTEM_PROCESSOR normalization for jpeg-turbo build too
* MSVC ARM64 support for freeverb
* "Mortal Edge" description nit
"Darkhammer" seems to be the more common rendering of the name.
* Add missing option descriptions
* Tighten spacing for version/disc info on mobile
* Graphics API init failure message nit
* Improve Widescreen/Ultrawide Collection/File Select Menus
Re-scale (unstretch) and center elements of the Collection Screen/File Select details screen for Widescreen/Ultrawide
* Fix oversight
Fix default behavior
* Support ultrawide on Collection menu, target PC
support ultrawide instead of reverting to default behavior
wrap logic in target PC ifdefs (both changed functions themselves are still behind them as a whole as well) and use old function behavior otherwise
* Fix icon overshift at ultrawide
Icon shifted too much at ultrawide
Move redundant duplicate line
* Finished Collection/File Select screen changes
Added settings for the scaling mode (GameCube, Wii, Dusklight)
Depending on the setting in the Interface menu (Dusklight preset automatically sets scaling to Dusklight option, Classic preset sets to Gamecube, Wii/all old behavior available as well) Collection and File Select screens get scaled differently
Fixed backdrop behind slots on File Select with Dusklight setting (the Magic Armor background slot seeming too low on all aspects is vanilla behavior)
Fixed Fused Shadow/Mirror size and position with Dusklight setting
All logic is behind TARGET_PC gates (not the logic specifically, but the functions themselves have always been)
Changes dSelect_cursor_c::refreshAspectScale to take a parameter so the scale of the selection cursor can be reset to default (only ever called in TARGET_PC functions or wrapped in gates)
* Ultrawide oversight
* Update d_file_select.cpp
copy paste oopsie
* Update d_file_select.cpp
im tired, never tested msvc
* Menu Scaling Mode
changed definitions to be more open ended
header additions now in TARGET_PC ifdefs
fixed/added scaling for Save/Option buttons in Collection menu with Dusklight setting, stopped scaling just the text
* Update settings.cpp
Adds an Output Resampling option to the Video tab to allow choosing between the old Bilinear sampler and a new Area sampler. Area sampling produces a much cleaner, softer image when downscaling, and a significantly sharper image when upscaling. This can also serve as a halfway decent anti-aliasing substitute until we have a more proper implementation.
* Add interpolation frame rate cap
* wip: reworked framelimiter
Based on my testing this is a bit more stable in frametimes.
* wip: efficiency improvement + windows build fix
Significantly improve efficiency by using a hybrid approach.
* wip: UI changes
* wip: end frame AFTER limiting
* wip: remove unused include
* wip: minor ui code change
Makes it easier to remove/add presets
* Simplify Limiter UI
- Change enableFrameInterpolation to an enum with off/capped/unlimited values
- Simplify the UI to use 2 settings (unlock framerate + a max value entry)
* wip: slight limiter simplification
* wip: implement review suggestions
* wip: fix syntax error
* wip: revert enum order + replace old checks
* Fix compile error
---------
Co-authored-by: SailorSnoW <sailorsnow@pm.me>
Co-authored-by: Loïs <49660929+SailorSnoW@users.noreply.github.com>
Co-authored-by: SuperDude88 <82904174+SuperDude88@users.noreply.github.com>
Co-authored-by: Luke Street <luke@street.dev>