This removes the last warnings in this area; in this case changing endianess
is not used for accessing emulated memory, just to flip few values to
low endian for storage.
This merge had serious conflicts; some of changes could be applied, but
others needed to be removed.
- Code for new SETMODE_RESTARTS_SUBSYSTEM was removed, as it depends on
SDL 1.2 functionality (SDL_SetVideoMode) and seems rather pointless
for SDL 2.0.
- Support for setting windowresolution as a percentage was retained, but
window centering of this feature likely won't work, as it depends on
SDL 1.2 env variable SDL_VIDEO_CENTERED.
- Support for applying windowresolution as a percentage was removed, as
it was implemented purely in code removed during transition to
SDL 2.0.
GitHub's ongoing issue of limitting the cache size has recently
been fixed (https://github.com/actions/cache/issues/6), so this
PR create a combined Clang+GCC cache for separate 32-bit and 64-bit
architectures under Windows.
When using C++11 code that can possibly throw exceptions (such as
std::make_shared(...) linking libstdc++.a using Clang on MSYS2
will generate errors such as:
libstdc++.a(eh_personality.o): duplicate section
`.rdata$_ZTSSt9exception[_ZTSSt9exception]' has different size
Although potential suggested fixes involve allowing duplicate symbols,
-Wl,--allow-multiple-definition, this solution can introduce unexpected
behavior when one symbol clobbers another symbol.
To solve this, switching to dynamic linking of the libstdc++ library
appears to be all that's needed.
Unmounting single binary-file CDROM images would result in a
crash as flagged by @dreamer_ in issue #112, who noted that
multiple tracks point to the same TrackFile (track.file field).
During destruction, the pre-C++11 code used a temporary
`TrackFile* last` variable to store the currently deleted
track.file's value and only delete the next track.file if it's
not equal to `last`. The result of this is that only the
first-encountered track.file was deleted and all subsequent
and back-to-back duplicate track.file values were left as-is.
This commit replaces the Track object's 'file' member pointer
with a shared_ptr, which effectively does the same thing by
only deleting the last reference.
The shared_ptr simplifies some error-cases where we previously
had to delete the Track.file allocation, but can now simply
let the Track object go out-of-scope and let the shared_ptr
delete it's managed object (if it has one).
Also re-order to perform shellcheck first because it
requires the least installation work compared to pylint
and markdownlint. The reason being if we're going to fail
during shellcheck, then we fail faster (and leave heavier
tasks for further down the line).
Add way to restart graphics subsystem on fullscreen/windowed mode transitions in OpenGL mode (disabled by default)
Add check for pixels being valid in OpenGL to prevent direct crash when the allocation fails.
Add define to turn off Pixel Buffer Object usage. (disabled by default)
Add a way to specify the windowresolution as percentage of your current resolution. (This centers the window.)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4306
Judging by the usage, this header belongs in there instead of being
limited to dos module only. This change makes it easier to reuse code
for new features related to drives mounting/unmounting.
The single use from friended class is in public interface. Removal of
friend designators allows Clang to pinpoint few additional unused
private fields.
Use the exact formatting suggested in COPYING file.
This change is basically a pretext to trigger a new clean build in
order to check if Coverity is capable of accepting new builds for
analysis finally.
Latest change from upstream made removed last usage of these functions.
Only ifdef-out them, in case future versions in upstream will use these
functions again.
This is old, and disabled by default in new MSVC compilers.
It was purely infomational warning:
"object name was truncated to 'number' characters in the debug
information"
Regardless, even if we'll decide to silence it again for any reason,
then it should be configured in VS project and not using ifdefed
pragma in the code.
Warning C4290 informs users, that MSVC ignores throw specification. This
is very good warning, because 'throw' specifications were faulty design
and got deprecated in C++11 and REMOVED from the language in C++20.
Throw specifications were replaced by much better 'noexcept' keyword,
which allows for compile-time checks, unlike 'throw', which might
silently inject exception 'std::unexpected'.
Static analyzer indicates that in this context `rem` can be NULL,
therefore should not be passed to strchr, but in this context `rem`
cannot be NULL becasuse `args` is not NULL (even after StripSpaces).
Previous implementation avoided invocation of 'pause' in many edge
cases, e.g.: when pause should be invoked between summary lines.
Avoid displaying '.' and '..' in root directory of mounted drive (just
like other dir implementations do).
Use C++11 for-each loop for iterating over directory entries.
Split code inside the loop by option, resulting in more readable
implementation.
Use "%*s" to inject empty whitespace of calculated size instead of
outputting spaces in a loop.
Leave some TODO notes describing further improvements.
This is in line with any other implementation of 'dir' command. It's
also very useful for identifying e.g. which floppy is currently mounted.
MS-DOS and cmd.exe display Volume Serial Number, but it emulating it in
DOSBox doesn't seem to be very useful.