P96 screens would always resize the window to the resolution set. However, if the user had resized the window to other dimensions, it would be preferable to keep those, instead.
This change does that, with the following catch: Only if the amiga window if larger than the requested RTG resolution, will it be kept. If it's smaller, the window will resize to accomodate the new resolution, to avoid scaling it down.
- Added buttons for loading and saving a custom (non-slot related) save state.
- Updated logic to save the corresponding screenshot based on the selected filename.
- When using custom filenames, no slot is selected. If you select a slot manually, the filename is reset to the default for that slot instead.
- Refactored the existing Load/Save to indicate they perform their action based on the selected slot
- Added a new Delete State slot button, to help clean up unwanted save states easier
- Added confirmation dialog before deleting
Modified the text in the file selection dialogs in `amiberry_gui.cpp`:
- Changed "Select save state file" to "Load a save state file" for loading operations.
- Changed "Select save state file" to "Save a save state file" for saving operations.
These changes provide clearer instructions to the user.
The dialog message "Emulation hasn't started yet" would be incorrectly shown if you also cancelled a warning of unsafe conditions, during the save state message.
The target default options had "automount_cddrives" enabled, which in turn enabled uaescsi.device always.
However, that should not be enabled in all cases.
When using Windowed mode, if the emulation window is manually resized, that position will be remembered and restored, if the GUI is opened and closed again.
When starting up, keep track of the GUI window size and position. If it's resized or moved, store the new values and re-use them when re-opening the GUI.
The `disk_selection` function in `amiberry_gui.cpp` has been updated to handle various types of shortcuts. The parameter name has been changed from `drive` to `shortcut`. The function now supports:
- Floppy disk images (shortcuts 0-3)
- Loading save states (shortcut 4)
- Saving save states (shortcut 5)
- Selecting CD images (shortcut 6)
Enhanced readability and consistency by replacing manual comparisons and assignments with std::max and std::min functions. Updated #include directives to use modern C++-style headers (e.g., <cmath> instead of <math.h>).
- Updated various functions to use `std::max` and `std::min` for clamping values.
- Removed `#ifdef PICASSO96` block in `updatepicasso96`.
- Changed surface format in `setupcursor` to `SDL_PIXELFORMAT_BGRA32`.
- The config name was always changed when inserting media into a drive (floppy, CD, whdload). However, this should not happen if we already had a config file loaded earlier.
- Refactor code in Floppy panel, reduce action listeners
- Add Save Config for Disk button: saves the configuration with the name of the inserted floppy image of DF0
- Replace NULL with nullptr
- initialize structs that needed intializing
- replace _stprintf() which is deprecated, with _sntprintf() (both are macros defined in string.h)
- Changed gui_update() to void, since it always returned zero and we never checked for the result value anywhere
- other minor code improvements
Some socket connections would not work properly in Amiberry (but also in most/all UAE implementations that were not WinUAE it seems, as they all use the same code).
Specifically, the optvalue would not cover cases that the type was SO_RCVTIMEO, SO_SNDTIMEO and SO_LINGER. All of these use a different struct, instead of an int value, and the result was that we'd get an error when we called setsockopt() - which got reflected back to AmigaOS, as an invalid parameter.
- When adding a hard drive, the text field with the path was annoyingly replaced on every widget refresh.
- Set active status on the dropdowns after initializing also, not after a widget action. This means that uaehf.device does not get to have controller type and feature level, as they don't make sense for it.